[launchd-dev] Launch Agent and per-user launchd not exiting on logout (10.5.8)

Sidney San Martín s at sidneysm.com
Thu Aug 26 16:30:00 PDT 2010


There's nothing special about the agent, and it's loaded by launchd
via /Library/LaunchAgents (except after installation). I tried killing
it, letting launchd reload it, and logging out and back in, and the
issue persisted. It only stopped after a reboot.

The author of <http://lists.macosforge.org/pipermail/launchd-dev/2009-January/000477.html>
pointed me at hist post; it looks like I'm not the first person to
experience this.

I like your trick! If I ever get my hands on another machine with
these symptoms, I'll give it a shot. Thanks.

On Mon, Aug 23, 2010 at 5:31 AM, Quinn "The Eskimo!" <eskimo1 at apple.com> wrote:
>
> On 20 Aug 2010, at 21:03, Sidney San Martín wrote:
>
>> I ran into a machine running OS 10.5.8 recently where our launchd
>> agent and the user's launchd did not terminate at logout.
>
> The per-user launchd does not necessarily quit at logout time.  Remember that the per-user launchd runs a variety of different sessions, so it will often remain running to manage those sessions.
>
> OTOH the GUI session is supposed to be torn down at logout time, and that should quit your GUI per-user launchd agent.  This does work in general (even on 10.5 :-).  Can you think of any special about your agent that might be causing this?  Are you explicitly loading your agent?
>
> If not, one trick I often use is to install TextEdit as a GUI per-user launchd agent.  This just requires you to create a minimal launchd property list file for TextEdit.  I can then use it to verify that launchd is behaving itself.  Once you do that, you should be able to compare your property list file to this dummy one, and your app to TextEdit, and see what's causing the problem.
>
> S+E
> --
> Quinn "The Eskimo!"                    <http://www.apple.com/developer/>
> Apple Developer Relations, Developer Technical Support, Core OS/Hardware
>
>
> _______________________________________________
> launchd-dev mailing list
> launchd-dev at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev
>


More information about the launchd-dev mailing list