In multi-thread applications in Linux environment, I'm using FIFO's for communicating between threads.

In order to make it work properly, the FIFO must be opened in non blocking mode. Up to fpc 3.0.4 I've been successfully using code like this:

fdc := FileOpen(myFifo,fmOpenWrite or O_NONBLOCK);

now in trunk the call returns forever an EAGAIN error (as if the O_NOBLOCK flag was not forwarded to OS), and to make it work I'm forced to use a call to fpOpen:

fdc := fpOpen(myFifo,O_RDWR or O_NONBLOCK);

which works properly.

Is this an fpc new feature or a bug?

Giuliano


_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to