[launchd-dev] Stray Proccess Log message

Quinn eskimo1 at apple.com
Tue Mar 18 06:47:06 PDT 2008


At 11:42 -0500 22/2/08, Geoff Franks wrote:
>/usr/sbin/raidutil list status | /usr/bin/mail -s "RAID: `hostname`"
><myaddress>
>
>Is all I'm calling. I've had reports of a few other people on the
>MacEnterprise list with similar issues regarding postfix/sendmail and
>launchd jobs. Should I file a bug report for this?

Geoff, did you ever file a bug about this?  I got asked about this on 
another mailing list and I pretty much worked out what's going on 
(see below).  If you did file a bug, I'd like to add some info to the 
bug.  I looked, and couldn't find it.

The following is in the context of <x-man-page://8/periodic>, but the 
basics should also apply to your situation.

>1. launchd starts the "periodic" script
>
>2. In this config, "periodic" runs <x-man-page://1/mail> to deliver the report
>
>3. "mail" ends up invoking <x-man-page://1/sendmail> to do the real work
>
>4. "mail" does not /wait/ for "sendmail" to complete
>
>5. "mail" quits
>
>6. "periodic" quits
>
>7. launchd cleans up the job
>
>If "sendmail" has not quit at this point, launchd garbage collects 
>it and you get this message (and no mail).
>
>One potential workaround is to set the "verbose" environment 
>variable.  This causes "mail" to wait for the "sendmail" to 
>terminate before it quits.  I'm not sure how that would play in the 
>context of "periodic".

S+E
-- 
Quinn "The Eskimo!"                    <http://www.apple.com/developer/>
Apple Developer Relations, Developer Technical Support, Core OS/Hardware


More information about the launchd-dev mailing list