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 re
> 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 th
Although this means I have to follow-up on myself: I just realized that this
isn't really that much trouble for me. The Hugs-stuff still might work and
only the wrapper would have to be rewritten in something else then ghc-Haskell.
--
Volker Stolz * [EMAIL PROTECTED] * PGP
On Fri, 12 May 2000, Simon Marlow wrote:
> I think the only recommendation is "don't use FIFOs" - I'm considering
> backing out the fix now.
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?)
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
> 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