Re: Using launchctl load
Re: Using launchctl load
- Subject: Re: Using launchctl load
- From: Rakesh Singhal <email@hidden>
- Date: Tue, 3 Feb 2009 19:31:54 +0530
Hi Axel,
Thanks. The plist file is:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.mycompany.mydaemond</string>
<key>OnDemand</key>
<true/>
<key>ProgramArguments</key>
<array>
<string>/Library/Application Support/MyFolder/MyDaemon</string>
</array>
<key>RunAtLoad</key>
<true/>
</dict>
</plist>
As you wrote daemons (/Library/LaunchDaemons) should not depend, it is
right. Infact it wroks properly if I reboot the system. But I want to
avoid to reboot the system only for daemon, so I use "launchctl load
/Library/LaunchDaemons/com.mycompany.mydaemond.plist" to make it work.
It works fine but when I log out, it doesnt work.
I think, it should not get affected even using launchctl load command
cause it is daemon.
Regards
rksinghal
On Tue, Feb 3, 2009 at 6:41 PM, Axel Luttgens <email@hidden> wrote:
> Le 3 févr. 09 à 11:43, Rakesh Singhal a écrit :
>
>> Hi all,
>>
>> I have one query and I have not found any documentation on this. I
>> wrote one plist and put it in LaunchDaemons folder. Now, to avoid
>> rebooting the system I use "launchctl load
>> /Library/LaunchDaemons/com.mycompany.mydaemon.plist" to start the
>> daemon. It starts working properly. When I logout and log in again, it
>> does not get started.
>
> Hello Rakesh,
>
> System daemons (the ones started from plists found in
> /System/Library/LaunchDaemons and /Library/LaunchDaemons) do not depend on
> the user logging in or out; only user agents (the ones started from plists
> found in /System/Library/LaunchAgents, /Library/LaunchAgents and
> ~/Library/LaunchAgents) do.
> But note that user agents never were fully functional with Tiger.
>
> If you haven't already done so, perhaps could you have a look at:
>
>
> <http://developer.apple.com/documentation/MacOSX/Conceptual/BPSystemStartup/Articles/LaunchOnDemandDaemons.html#//apple_ref/doc/uid/TP40001762>
>
> as well as at the man pages for launchd(8) and launchd.plist(5).
>
>
>> If I reboot then it works fine.
>>
>> Do I need to modify plist file?
>> or
>> is there any other way to do it?
>> or
>> it behaves in this way only.
>
> Could you tell us a bit more about what you want to achieve?
> And post your plist here?
>
>
>> Testing machine is iMac 10.4.11 PPC.
>
> As said above, this is an important point. ;-)
>
> HTH,
> Axel
>
>
_______________________________________________
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