daemondo defeats purpose of launchd?
sfiera at macports.org
Sat Sep 1 09:47:32 PDT 2007
On 01 Sep, 2007, at 4:35, Ryan Schmidt wrote:
> I have this problem: the lighttpd web server on my MacBook Pro
> unexpectedly dies rather frequently (much more frequently than it
> did on my PowerBook). When this happens, the daemondo process is
> still there, and I have to use launchctl to unload and then load
> the lighttpd plist to get the server running again.
> The point of launchd is that it notices when processes unexpectedly
> quit, and restarts them automatically so close to no downtime is
> observed. But launchd is monitoring daemondo, which does not exit,
> so launchd does not restart anything. And daemondo doesn't seem to
> have the same process-death-noticing feature so daemondo is not
> automatically restarting the failed lighttpd.
Agreed. I try to avoid daemondo when possible. When it isn't
possible, daemondo is an indispensable tool, but it turns out that
for most cases, it's possible to avoid it. I've written many launchd
scripts on my own, several of which I've put online .
It's possible to make launchd scripts similar to these in MacPorts
via startupitem.executable, but currently, the startupitem.* commands
in MacPorts do not support setting the "User" key. For lighttpd,
that's not necessary; it starts as root so it can listen on the
privileged port 80, then drops privileges. For mysql, though, it's
There's also no support for inetd, which I use for rsyncd and cups-
lpd--but these are not things I expect MacPorts to install scripts
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 186 bytes
Desc: This is a digitally signed message part
Url : http://lists.macosforge.org/pipermail/macports-dev/attachments/20070901/bc4a0754/PGP.bin
More information about the macports-dev