Re: launchd - is my job already loaded?
site_archiver@lists.apple.com Delivered-To: darwin-dev@lists.apple.com Thread-index: AcmY+Qx0sZTwMf37m0Wz8IyzDYMlZg== Thread-topic: launchd - is my job already loaded? User-agent: Microsoft-Entourage/12.15.0.081119
But I am setting this up programatically. So, is there an API to do this, or is the correct/supported/only way to do this by fork+exec launchctl?
Also, is there a prettier way of determining if a job is loaded other than exec `launchctl list` and parsing the output?
In that case, check out launch.h, the API to the launchd for your user. You can use it to send messages to the daemon, which can start/stop/list jobs amongst other things. It isn't the easiest thing to work with, and I don't think Apple encourage its use for job management. That said, launchd is open source, and Rainer Brockerhoff has written some sample code using the launch.h API ( http://www.brockerhoff.net/bb/viewtopic.php?p=2647#2647). *********************************************************************** This e-mail and its attachments are confidential, legally privileged, may be subject to copyright and sent solely for the attention of the addressee(s). Any unauthorized use or disclosure is prohibited. Statements and opinions expressed in this e-mail may not represent those of Radialpoint. Le contenu de ce courriel est confidentiel, privilégié et peut être soumis à des droits d'auteur. Il est envoyé à l'intention exclusive de son ou de ses destinataires. Il est interdit de l'utiliser ou de le divulguer sans autorisation. Les opinions exprimées dans le présent courriel peuvent diverger de celles de Radialpoint. _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-dev mailing list (Darwin-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-dev/site_archiver%40lists.appl... This email sent to site_archiver@lists.apple.com
participants (1)
-
Tim Murison