[launchd-dev] How to ensure that my job is launched through launchd and not directly?

Per Olofsson per.olofsson at gu.se
Mon Apr 20 00:31:23 PDT 2015


17 apr 2015 kl. 18:10 skrev Damien Sorresso <dsorresso at apple.com>:
> 
> For various reasons, that is probably not as reliable as you'd think across OS versions, especially crossing from Mavericks to Yosemite. The environment variable is a fairly authoritative indication that launchd spawned you. Of course, anyone can set it if they spawn your binary by hand, so just don't make security decisions based on its presence or absence.
> 
> Also those APIs are incredibly awkward and have been deprecated in Yosemite.

Agreed, the new API in launch(3) is a heck of a lot cleaner, but I haven't had a chance to rewrite anything yet.

Thanks for the info!

-- 
Per Olofsson, IT-service, University of Gothenburg



More information about the launchd-dev mailing list