Michael Norrish wrote:
Well, it seems as if the problem for exec is just on MacOS, and I'm happy to fork there, even if it's annoying to have to do so. Cygwin is not really relevant, but I suppose that, out of idle curiosity, it would nice to know if Posix.Process.exec worked there. My application really only wants to exec, not fork.
It works fine on Cygwin. I did a further experiment on Mac OS X to see if exec would work if it was invoked from the "main" thread (i.e. the thread that initially starts the poly executable). In Mac OS X that's the only thread that receives asynchronous signals so has some special status. Unfortunately that didn't work either so it doesn't look as though there's any alternative to using "fork".
David