Re: launchd - is my job already loaded?
Re: launchd - is my job already loaded?
- Subject: Re: launchd - is my job already loaded?
- From: Tim Murison <email@hidden>
- Date: Fri, 27 Feb 2009 11:32:58 -0500
- Thread-topic: launchd - is my job already loaded?
> 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 (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden