[MLton-user] cygwin fork?
Petersen, Leaf
leaf.petersen at intel.com
Fri Sep 21 15:32:34 PDT 2007
I just upgraded to the latest release of MLton, and simultaneously
updated my cygwin to the latest version. Some combination of the two
seems to have resulted in fork no longer working. In particular the
following SML code
val _ =
case Posix.Process.fork ()
of NONE =>
print "Child"
| SOME pid =>
print "Parent"
produces the following output when compiled and run with mlton:
unhandled exception: SysErr: Function not implemented [nosys]
1) There are several hints in the source and on the web that there are
issues with fork. However, in poking through the source, I couldn't
figure out where this error was happening. As far as I could tell, the
C "fork" function is being eventually called, and presumably is
returning ENOSYS. And yet a similar C test program seems to work. What
am I missing?
2) There are suggestions that using spawn is a good workaround. This
seems to work correctly for me. However, I haven't figured out how to
suppress stdin and stdout when using spawn as opposed to fork/exec.
Anyone have experience with this?
Any suggestions or comments appreciated.
Thanks,
Leaf
More information about the MLton-user
mailing list