[launchd-dev] ~/LaunchAgent + KeepAlive=true = Login Jail

Nathan Duran launchd at khiltd.com
Mon Jan 28 10:46:36 PST 2008

On Jan 28, 2008, at 8:25 AM, Hamish Allan wrote:

> You might try listening for distributed notifications associated with
> shutdown and restart:
> com.apple.restartInitiated
> com.apple.shutdownInitiated
> com.apple.logoutCancelled

I imagine you would also be able to determine whether the Quit event  
came from user interaction with your own menus or was an AppleEvent  
sent by the system. If not through Cocoa directly, then possibly  
through a CGEventTap.

More information about the launchd-dev mailing list