Re: Using launchctl load
Re: Using launchctl load
- Subject: Re: Using launchctl load
- From: Rakesh Singhal <email@hidden>
- Date: Tue, 3 Feb 2009 22:27:23 +0530
Hi,
I am starting in root's process space and it starts also but logging
out is terminating the daemon process.
If I reboot the system then logging out does not terminate the daemon
process. Machine is iMac 10.4.11.
Regards
rksinghal
On Tue, Feb 3, 2009 at 8:54 PM, Jason Coco <email@hidden> wrote:
>
> On Feb 3, 2009, at 05:43 , Rakesh Singhal wrote:
>
>> 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.
>>
>> 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.
>>
>> Testing machine is iMac 10.4.11 PPC.
>
> Hello Rakesh,
>
> This almost certainly happens because you are staring the daemon in the
> user's process space. Since this is a system daemon, you should start it in
> the system namespace and in root's process space. Try using sudo to launch
> it:
>
> sudo launchctl load /Library/LaunchDaemons/com.mycompany.mydaemon.plist
>
> This should have the desired effect. Logging out the first time will no
> longer terminate the daemon process.
>
> Jason
>
_______________________________________________
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