[launchd-dev] Technical Question

Jan Michael jan.michael at gmail.com
Wed Sep 17 03:15:33 PDT 2008


Quinn,

many thanks for the tip and also pointing out the TN.
Cheers,

	Jan

On 17.09.2008, at 10:51, Quinn wrote:

> At 22:05 +0200 16/9/08, Jan Michael wrote:
>> So the question is now. It is possible to have a script like that  
>> work
>> with launchd? What do I have done wrong?
>
> The problem here is that a process started by your script is
> outliving your script.  launchd detects this are automatically
> garbage collects the errant process.  This is discussed in detail in
> the "Careful With That Fork, Eugene" section of TN2083.
>
> <http://developer.apple.com/technotes/tn2005/tn2083.html>
>
> In this specific case the problem is the ampersand at the end of line
> 2 of your script.  That causes the contents of line 2 to run in the
> background.  The script then exits, launchd detects the stray
> process, and cleans them up.  It looks like your script is meant to
> run forever.  In that case, you don't need the ampersand.
>
> S+E
> -- 
> Quinn "The Eskimo!"                    <http://www.apple.com/developer/ 
> >
> Apple Developer Relations, Developer Technical Support, Core OS/ 
> Hardware
> _______________________________________________
> launchd-dev mailing list
> launchd-dev at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/launchd-dev



More information about the launchd-dev mailing list