[Mono-dev] System.Unix.Native.Syscall.fork is commented out
Miguel de Icaza
miguel at novell.com
Wed Nov 5 22:13:53 EST 2008
> It seems to me that the one valid reason to fork() is to detach from the
> controlling terminal. This can (and should) be done before starting any
> threads other than Main(). So long as it is done right at the beginning, it
> seems unlikely it will cause problems.
You can do this in your script that invokes mono:
#!/bin/sh
mono /usr/lib/mydaemon/mydaemon.exe &
If you want to break the link to the terminal, you can call setsid.
Miguel.
More information about the Mono-devel-list
mailing list