20 Apr
2015
20 Apr
'15
7:31 a.m.
17 apr 2015 kl. 18:10 skrev Damien Sorresso <dsorresso@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