On 3 Dec 2009, at 07:34, Saso Kiselkov wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> And what's stopping you from simply forking into the background? Like
> with the following:
> 
> if (daemon (0, 0) == -1)
>  {
>    NSLog (@"Error daemonizing: %s", strerror (errno));
>    exit (EXIT_FAILURE);
>  }

I don't think that addresses the issue of registering a name.

Perhaps more importantly though, the code above has the problem of 'daemon()' 
being severely unportable.

In GNUstep you should use NSTask to portably create a subprocess.

The gdnc tool (base/Tools/gdnc.m) provides an example of a process which makes 
itsself be a daemon in a portable manner.




_______________________________________________
Discuss-gnustep mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnustep

Reply via email to