[launchd-dev] LaunchD crashing daemon in 10.5

Shaun Wexler dev at skwdev.com
Fri Feb 8 22:47:15 PST 2008


On Feb 8, 2008, at 3:45 PM, Carl Smith wrote:

> I have an agent and daemon that I have installed and running on a 10.5
> system. The problem I am having is when I do an 'update' the call from
> 'sudo launchctl unload
> /System/Library/LaunchDaemons/com.mycompany.mydaemon.com' my daemon
> receives a SIGTERM and aborts and the rest of my install procedures
> fails.
>
> My project consists of an agent and a daemon. The plists that I use
> 'launchctl unload' on live in the following areas:
>
> Daemon = /System/Library/LaunchDaemons/
> Agent = /Library/LaunchAgents/
>
> I use 'sudo launchctl unload ...' for the daemon and 'launchctl unload
> ...' for the agent.
>
> This 'update' works fine in 10.4 but fails under 10.5. I can install  
> my
> agent and daemon fine I just can't seem to 'unload' gracefully running
> in the 10.5 enviroment.
>
> Any suggestions or help would greatly be appreciated.

Your daemon is not following the spec.  It must catch SIGTERM,  
cleanup, then exit(EX_OK).
-- 
Shaun Wexler
MacFOH
http://www.macfoh.com

"A person who never made a mistake never tried anything new." - Albert  
Einstein




More information about the launchd-dev mailing list