[launchd-dev] LaunchD crashing daemon in 10.5

Carl Smith Carl.Smith at kaseya.com
Fri Feb 8 16:07:21 PST 2008


I am taking over this project from another developer so please excuse me
ahead of time for any 'stupid' questions.

As far as SIGTERM goes in Apples tech notes about launchd it says one
should be catching SIGTERM, for what I do not know, but my question
would be why would catching it in 10.4 not make a different but in 10.5
it does?

And why would 10.5 be throwing a SIGTERM and 10.4 not throwing one?

Thanks
Carl



Not that this should be causing the problem, but you shouldn't be
writing to /System -- your daemon should be installed in
/Library/LaunchDaemons.

Can you not just catch SIGTERM in your daemon and exit cleanly?

Hamish

On Feb 8, 2008 11:45 PM, Carl Smith <Carl.Smith at kaseya.com> 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.
>
> Carl
> _______________________________________________
> launchd-dev mailing list
> launchd-dev at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo/launchd-dev
>
_______________________________________________
launchd-dev mailing list
launchd-dev at lists.macosforge.org
http://lists.macosforge.org/mailman/listinfo/launchd-dev


More information about the launchd-dev mailing list