Thu, 11 May 2000 06:39:10 -0700, Simon Marlow
[EMAIL PROTECTED] pisze:
The solution, if you're interested, is to open the file in blocking
mode and set O_NONBLOCK later on with an fcntl().
It means that waiting for the writer blocks the whole program, right?
Yes, and that's another
On Fri, May 12, 2000 at 02:51:21AM -0700, Simon Marlow wrote:
I think the only recommendation is "don't use FIFOs" - I'm considering
backing out the fix now. A Unix domain socket provides the same facilities
and has reasonable semantics.
...though it isn´t the same as a FIFO as you you can´t
It is certainly better after a fix, at least for
single-threaded programs
which work perfectly.
With native threads (BTW, are they expected to work soon?) it
would work
well too.
Perhaps... but pthreads emulated in user-space would suffer from the same
problems as GHC, because they
Testing under Linux showed that after opening a fifo with O_NONBLOCK
we should call select on it before read: it will not say we can read
from it until another process opens it for writing.
And when another process opens it for writing and closes without
writing anything, select says we should