[Haskell-cafe] Re: reliable (bi)directional pipe to a process

Simon Marlow marlowsd at gmail.com
Wed Nov 12 07:18:01 EST 2008


oleg at okmij.org wrote:
> I'd like to point out a reliable, proven and simple way of interacting
> with another process, via unidirectional or bidirectional pipes. The
> method supports Unix sockets, pipes, and TCP sockets.
> 
> I too have noticed insidious bugs in GHC run-time when communicating
> with another process via a pipe. I tried to use runInteractiveProcess;
> it worked -- up to file sizes of about 300Kb. Then GHC run-time seems
> to `loses synchronization' -- and corrupts IO buffers, receiving stuff
> that cannot have been possibly sent. This is because handle operations
> are asynchronous and the GHC scheduler seems to have race conditions.
> That behavior was totally unacceptable. I was writing a production
> code, and can't afford such errors.

If there are bugs of this kind, we really need to get them fixed - I'm not 
aware of anything like this being reported.  Please, if anyone can 
reproduce this, or even if you can't, submit a bug giving as many details 
as you can.

Cheers,
	Simon


More information about the Haskell-Cafe mailing list