Cron/Sendmail Defunct Processes

Adam Funk a24061 at ducksburg.com
Wed Dec 5 10:52:08 UTC 2007


On 2007-12-04, Schiz0 wrote:

> On Dec 4, 2007 11:31 AM, Adam Funk <a24061 at ducksburg.com> wrote:
>> On 2007-12-04, Schiz0 wrote:

>> > I'm running Ubuntu 7.10 Server Edition. I have a cron script (
>> > http://pastebin.ca/803903 ). I edited crontab using "crontab -e"
>> > (Running as the ircd user) and added the line (
>> > http://pastebin.ca/805617 ). I have exim4 installed and running (I
>> > have send emails successfully from command line and also php scripts).
...
>> > My problem is as follows: When the anope services daemon is not
>> > running, the cron script starts it, and outputs some text (Which I
>> > want to to be emailed to me). But instead of emailing the output to
>> > me, cron opens up defunct zombie processes for sh and sendmail and I
>> > must kill the cron process to get rid of other processes.
>> >
>> > The output of "ps -ef" showing the defunct processes is at
>> > http://pastebin.ca/803916
>> > The sendmail process stays there until I kill the "/USR/SBIN/CRON" process.

I have one more idea.  If the script that you call from the crontab
doesn't terminate (and close its STDOUT), then the sendmail process is
still waiting for its STDIN to finish before sending the mail.

This might also be the case if a process started by the script (the
daemon itself) inherits the script's STDOUT.





More information about the ubuntu-users mailing list