Re: [launchd-dev] Facing problem with launch daemon on logout
On 8 May 2012, at 08:07, Nandini Vijayashankar wrote:
If i restart the computer and login, my daemon is running. After this if i logout and login again, daemon is exited with error code 143
If i explicitly load the job, logout and login, daemon is running.
Problem is when the system is restarted and I logout and login.
It's likely that your daemon is connecting to the window server, and thus killed when the window server dies on logout. Do the following: $ otool -L /path/to/your/daemon and check that all the frameworks you use are daemon safe [1]. Also, when you explicitly load the job, make sure you use "sudo". Without that your daemon ends up loading in the per-user context, which generally isn't what you want. Share and Enjoy -- Quinn "The Eskimo!" <http://www.apple.com/developer/> Apple Developer Relations, Developer Technical Support, Core OS/Hardware [1] Per the definition in Technote 2083 "Daemons and Agents". <https://developer.apple.com/library/mac/#technotes/tn2083/_index.html>
participants (1)
-
Quinn "The Eskimo!"