[launchd-dev] Install and load a launch daemon without a reboot

Jeremy Reichman jaharmi at jaharmi.com
Fri Jan 28 08:00:19 PST 2011


I tested, and with my installer -- which is set to require
RootAuthorization -- the following Python snippet in a postflight script:

 if real_uid == 0 and effective_uid == 0:

... does succeed. Both the UID and EUID are 0.

I also see that the launchdaemon that I was trying to load is, in fact,
loaded afterwards (when running launchctl with sudo). Although I'm going
to have to confirm that on a clean system, so take that result with a
grain of salt.

-- 
Jeremy




More information about the launchd-dev mailing list