From: AIDA S. <sh...@so...> - 2007-04-20 08:28:43
|
At Thu, 19 Apr 2007 09:16:55 -0700, David R. Morrison wrote: > > > On Apr 19, 2007, at 8:03 AM, David H. wrote: > > > Hello all. > > > > Just a question. What is/are the main differences and what should we > > focus on supporting or converting to? > > This is a good point. We probably need to be moving away from > daemonic in the near future. Lanuchd cannot replace daemonic. The launchd.plist(5) manpage reads: > A daemon or agent launched by launchd MUST NOT do the following in > the process directly launched by launchd: > > o fork(2) and have the parent process exit(3) or _exit(2). > o Call daemon(3) > > A daemon or agent launched by launchd SHOULD NOT do the following as > a part of their startup initialization: > > o Setup the user ID or group ID. > o Setup the working directory. > o chroot(2) > o setsid(2) > o Close "stray" file descriptors. > o Change stdio(3) to /dev/null. > o Setup resource limits with setrusage(2). > o Setup priority with setpriority(2). > o Ignore the SIGTERM signal. In short, launchd is a replacement of inetd rather than rc scripts or StartupItems or daemonic. |