[Hugs-users] No way to fork() ?

ross at soi.city.ac.uk ross at soi.city.ac.uk
Sun Apr 17 20:12:45 EDT 2005


On Sat, Apr 16, 2005 at 12:47:39PM +0000, John Goerzen wrote:
> I am trying to write my own pOpen for Haskell.  I have a version that
> works fine in GHC, but I can't quite make it work in Hugs.  There are
> two things missing: the ability to fork and the ability to install a
> signal handler for SIGPIPE.
> 
> First, on the forking.  There is a vague note on
> http://cvs.haskell.org/Hugs/pages/libstatus.html about co-operative
> concurrency.

That page was a little out of date:

- System.Process is missing; the chief problem is Hugs's representation
  of handles.  Perhaps not insuperable.
- System.Posix.Process.forkProcess is probably approximately
  implementable, modulo problems with handles.
- System.Cmd.rawSystem is present.

> The same note applies to signals, and again, I'm not sure why.

System.Process.Signals.installHandler requires execution of an arbitrary
IO action at an arbitrary point in the program, and Hugs can't do
pre-emption.

So it seems it's not going to work with hugs98-Mar2005.  Hopefully
a future version will have System.Process.


More information about the Hugs-Users mailing list