FreeBSD + FIFO pipes

Volker Stolz stolz@i2.informatik.rwth-aachen.de
Wed, 19 Feb 2003 14:33:13 +0100


In local.glasgow-haskell-users, you wrote:
> I'm trying to get HTk to work on FreeBSD (actually FreeBSD running inside a VMware
> virtual machine, but I don't think that should make any difference).  How HTk works
> is it creates a couple of pipes
>        (readIn,writeIn) <- Posix.createPipe
>        (readOut,writeOut) <- Posix.createPipe
> The problem I am getting with FreeBSD is that fdRead sometimes reports EOF, even though
> threadWaitRead has just reported the presence of data.  (And no, I don't think we have
> a race condition here, the relevant bit of code is in an exclusive lock.)  If I tell it
> to ignore the EOF and try to read again and again it just throws it into an endless loop,
> seemingly.

Can you cut this down to a simple program, maybe executing /bin/echo
instead of 'wish'? Notice that the FAQ doesn't apply here as the FAQ
talks about FIFO createt by mkfifo (which exist in the file system),
while you talk about pipes.

I'll try to think of something, but I'd be glad if you already
had a usable program to reproduce this error.
-- 
http://www-i2.informatik.rwth-aachen.de/stolz/ *** PGP *** S/MIME
rage against the finite state machine