named pipes

I’m using PGI Fortran Compiler 5.0-2 on a RedHat Linux 2.4.21. I am trying to transfer data between 2 executables using named pipes. The named pipe was created from Linux using mkfifo. The executables are opening the file (the named pipe) and one application write data, and the other is reading. It seems that the named pipes are buffered, i.e. the data transfer is performed only after the first application is closed. I would like to know how the data transfer can be performed instantaneous, i.e. after each write statement.

If necessary, I can provide the 2 simple applications, the data sender, and the data receiver.

Any suggestions/comments are welcome.
Thank you very much for your help.

Try calling ‘fflush’ after a write. This tells the OS to flush the buffer. Note that doing this after every write might cause a slow down so I’d recommend using only as many calls as absolutely needed.

  • Mat