[Haskell-cafe] Re: exitFailure under forkProcess
Simon Marlow
simonmar at microsoft.com
Wed Oct 27 06:41:15 EDT 2004
On 27 October 2004 02:03, John Goerzen wrote:
> On 2004-10-26, Peter Simons <simons at cryp.to> wrote:
>> By the way: It's good to know I'm not the only one wrestling
>> with Haskell's concurrency code. :-)
>
> Yes. Its POSIX interface is, uhm, weird. I can't quite put my finger
> on it, but things like setting up a pipe to a child process's stdin
> just seem brittle and fragile with all sorts of weird errors. I can
> do this in my sleep in C, Perl, or Python but in Haskell I can barely
> make it work when I'm fully conscious :-)
*laughs*
Is there anything concrete we can do? The POSIX layer is supposed to be
pretty minimal, so in theory most POSIX idioms should not be harder in
Haskell, and hopefully should be easier.
We're open to suggestions, and even more open to code...
> Oh also, I would very much appreciate Haskell interfaces to realpath()
> and readlink(). And a system/rawSystem that returns the waitpid()
> exit status like system(3) does, not just the exit code. (What
> happens if the process died because of a signal?)
system(3) is one of the things missing from the current System.Posix
API. To see what else we consider to be missing, take a look at the
comment in the System.Posix source:
http://cvs.haskell.org/cgi-bin/cvsweb.cgi/~checkout~/fptools/libraries/u
nix/System/Posix.hs?rev=1.11;content-type=text%2Fplain
Since realpath() isn't POSIX, it would have to go into
System.Posix.Exts.
Cheers,
Simon
More information about the Haskell-Cafe
mailing list