LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices

Reply
 
Search this Thread
Old 12-02-2007, 01:49 PM   #1
Schiz0
LQ Newbie
 
Registered: Dec 2005
Location: Pennsylvania, USA
Distribution: FreeBSD, Ubuntu, and Debian
Posts: 10

Rep: Reputation: 0
Exclamation Cron/Sendmail Defunct Processes


Hey everyone,

I have a cron script ( http://pastebin.ca/803903 ). I edited crontab using "crontab -e" and added the line ( http://pastebin.ca/803905 ). I DO have sendmail 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 cron opens up defunct zombie processes for sh and sendmail and I must kill the cron process.

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.

How can I solve this? All I want is to be emailed when the services daemon isn't found. I'm running Ubuntu 7.10 Gusty.
 
Old 12-02-2007, 06:32 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,118
Blog Entries: 54

Rep: Reputation: 2787Reputation: 2787Reputation: 2787Reputation: 2787Reputation: 2787Reputation: 2787Reputation: 2787Reputation: 2787Reputation: 2787Reputation: 2787Reputation: 2787
If there's no errors in the services log, then what happens if you change the "./$ANOPROG" line to "exec ./$ANOPROG"? BTW this script is different from the default one in Anope 1.6.5? And the 6 line "if [ `ps auwx | grep $ANOPROG" if statement can be replaced with one "pgrep -f "ANOPATH/$ANOPROG 2>&1>/dev/null" && exit 0".
 
Old 12-02-2007, 07:43 PM   #3
Schiz0
LQ Newbie
 
Registered: Dec 2005
Location: Pennsylvania, USA
Distribution: FreeBSD, Ubuntu, and Debian
Posts: 10

Original Poster
Rep: Reputation: 0
Well the issue isn't the fact that the services aren't starting or anything. I just want to be emailed with the output of the cron script. Instead of getting emailed, cron creates zombie sendmail processes which never die or send the email.

I tested this by manually stopping the services, then waiting 10 minutes for the cron script to run. The cron script runs, and the services start back up, but I never get the email from the output of the cron script. The sendmail process that started from cron freezes up somehow for some reason and becomes a defunct zombie process.

Basically all I want is to be notified with the output of cron. I don't know if this is a cron problem or a sendmail problem.

I actually switched from sendmail to exim4 after making that original post, and it does the same exact thing.
 
  


Reply

Tags
cron, defunct, sendmail


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
howto kill defunct processes mocean Suse/Novell 6 08-05-2007 11:20 PM
Removing defunct httpd processes closet geek Linux - General 1 07-08-2006 09:28 AM
defunct processes in cron bujecas Debian 1 02-07-2006 01:59 PM
Crond running to many processes <defunct> tpfraz Linux - General 1 01-13-2004 07:03 AM
processes showing defunct jpbarto Linux - Software 2 11-05-2003 10:15 AM


All times are GMT -5. The time now is 11:12 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration