[X-Unix] How make launchd stop trying to launch nonexistent program?

Eric F Crist ecrist at secure-computing.net
Thu Apr 17 05:19:40 PDT 2008


According to man launchd, a separate launchd process is started for  
each application started and controlled by launchd.  As such, I get  
the following output:

ecrist at swordfish:~-> ps auxwww |grep launch
ecrist     110   0.0  0.2   391468   3728   ??  S     6:56PM    
0:00.16 /System/Library/CoreServices/AirPort Base Station Agent.app/ 
Contents/MacOS/AirPort Base Station Agent -launchd
ecrist     106   0.0  0.0   599792    652   ??  Ss    6:56PM    
0:01.05 /sbin/launchd
_mdnsresponder    20   0.0  0.1    77312   1264   ??  Ss    6:56PM    
0:00.50 /usr/sbin/mDNSResponder -launchd
ecrist    1690   0.0  0.0   599780    400 s000  R+    7:13AM   0:00.00  
grep launch
root         1   0.0  0.0   600816    560   ??  Ss    6:56PM    
0:01.30 /sbin/launchd

Do you see your process when you run a ps auxwww?  You can see above  
that there is a launchd proccess (pid 106) and another process,  
AirPort Base Station (pid 110).  Both are owned by my user, and since  
they're pretty close to the same pid, I'd make the assumption they're  
related.  Look for this type of output on your system and see if you  
can't kill the launchd process responsible.

The funny thing about launchd is that Apple actually recommends  
*against* using it, and instead asks you to use whatever programs own  
daemon instead.  From the launchd man page:

Where possible, it is preferable for jobs to launch on demand based on  
criteria specified in their respective configuration files.

HTH

Eric

On Apr 16, 2008, at 11:12 PM, Jerry Krinock wrote:

>
> On 2008 Apr, 16, at 20:12, Eric F Crist wrote:
>
>> Sighup the launchd process maybe.
>
> I typed into Terminal "kill -1 1" since HUP is signal 1 and  
> launchd's pid=1.  Did not help.
>
>> If that doesn't help, restart the daemon entirely.
>
> Not sure what you mean by that, but I tried "kill -9 1".  Also did  
> not help.  I think maybe launchd ignored the signal since after  
> doing this it was still running and still had the same pid=1.
>
>> I'll look more into it if you don't have a solution by tomorrow  
>> morning.
>
> Didn't find anything yet.  I'm going to bed soon myself.
>
> Thanks Eric,
>
> Jerry
>
> _______________________________________________
> X-Unix mailing list
> X-Unix at listserver.themacintoshguy.com
> http://listserver.themacintoshguy.com/mailman/listinfo/x-unix

-----
Eric F Crist
Secure Computing Networks




More information about the X-Unix mailing list