[MLton] Finished (?) MLton.Child
Stephen Weeks
MLton@mlton.org
Wed, 24 Nov 2004 17:53:59 -0800
> I think it's ready from my side. I have attached two patches.
Great. I just checked in (a heavily modified form of) the patch.
Here's the commit email:
http://mlton.org/pipermail/mlton/2004-November/016787.html
Here are the changes from the patch you sent.
* I integrated into MLton.Process instead of MLton.Child. This took a
minor amount of reorganization to avoid the dependency cycle you
noticed.
* Cygwin does not use mmap by default. However, I added a runtime
switch, "use-mmap", that lets one enable mmap-based memory
allocation on the command line. This has not been well tested.
* I did lots of reformatting and MLtonization.
There are a few remaining issues.
* I tested on all our platforms using a Linux -> <platform> cross
compiler. Everything worked fine, except for Cygwin. With the
CreateProcess-based implementation, the test code dies when
attempting to reap the process. The error is
unhandled exception: SysErr: No child processes [child]
With the fork-based implementation, the test code hangs. I'd be
interested to see if you get the same.
* It seems wrong that on Cygwin MLton.Process.create expects
Windows-style paths, whereas the rest of Cygwin expects Unix-style
paths.
* At some point, the {searchPath: bool} argument to Process.create got
dropped. I guess the idea is that we could have a separate function
"val which: string -> string" that looks in the path for an
executable?
* I think there may be a little room for improvement in making the
remember function more type safe. I'll think about it.
Hopefully it won't be too hard to cleanup whatever bugs I introduced.