[MLton] Win32 Spawn's Seem Broken
Matthew Fluet
fluet@cs.cornell.edu
Thu, 15 Jul 2004 17:31:02 -0400 (EDT)
> 1. Modify spawnp/spawne to use "NON_BLOCK" so that it
> returns a PID, rather than a return code?
I suspect this will be the right solution; you may need to use appropriate
#if (defined (__MINGW__))
magic to avoid conflicts with Cygwin.
I note that in Cygwin's /usr/include/process.h, I have:
#define _P_WAIT 1
#define _P_NOWAIT 2 /* always generates error */
#define _P_OVERLAY 3
#define _P_NOWAITO 4
#define _P_DETACH 5
even though NOWAIT would seem to be the appropriate flag. I don't know if
this is due to Cygwin or Win32.
I've never worked on the Cygwin port, so experimentation may be your best
bet.