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

John Goerzen jgoerzen at complete.org
Sat Apr 16 08:47:39 EDT 2005


Hello,

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.  I don't understand why this is relevant.  If I want to
fork, let me fork; using a low-level function implies that the
programmer knows what's going on anyway.  I have no intention of using
any other sort of concurrency in this program, so there should be no
problem.  Moreover, Hugs has a call to system(), which internally must
use fork() anyway.  (I'm puzzled why rawSystem() is missing; somewhere,
FFI must have been used to get to system(), right?)

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

Also, Hugs doesn't seem to have System.Process, though there's no note
explaining why it is not present.

I'm probably missing something important here, but I can't figure out
what it is.  Lacking these functions really diminishes Hugs' usefulness
as a scripting language to me, which is a shame; it would make a great
one.

Thanks,

-- John



More information about the Hugs-Users mailing list