From owner-freebsd-questions Thu Sep 26 2:30:55 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0AEEA37B401 for ; Thu, 26 Sep 2002 02:30:54 -0700 (PDT) Received: from grillolja.cs.umu.se (grillolja.cs.umu.se [130.239.40.17]) by mx1.FreeBSD.org (Postfix) with ESMTP id 597B243E6A for ; Thu, 26 Sep 2002 02:30:53 -0700 (PDT) (envelope-from tdv94ped@cs.umu.se) Received: from localhost (localhost [127.0.0.1]) by amavisd-new (Postfix) with ESMTP id 37FA6A02F for ; Thu, 26 Sep 2002 11:30:52 +0200 (MEST) Received: from kvist.cs.umu.se (kvist.cs.umu.se [130.239.40.192]) (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits)) (No client certificate requested) by grillolja.cs.umu.se (Postfix) with ESMTP id BF6C2A030 for ; Thu, 26 Sep 2002 11:30:48 +0200 (MEST) Date: Thu, 26 Sep 2002 11:30:47 +0200 (MEST) From: Paul Everlund To: freebsd-questions@freebsd.org Subject: Cron leaving a zombie Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new amavisd-new-20020630 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi! I have this little script in /usr/local/etc/rc.d to start, stop and restart a daemon: adac.sh #!/bin/sh case "$1" in start) echo -n ' adac' /usr/local/sbin/adac 4444 > /dev/null & ;; stop) /bin/kill `/bin/cat /var/run/adac.pid 2> /dev/null` 2> /dev/null /bin/rm -f /var/run/adac.pid ;; restart) /bin/kill `/bin/cat /var/run/adac.pid 2> /dev/null` 2> /dev/null /bin/rm -f /var/run/adac.pid sleep 5 /usr/local/sbin/adac 4444 & > /dev/null ;; *) echo "" echo "Usage: adac.sh {start|stop|restart}" echo "" exit 64 ;; esac Then I did put this in roots crontab: 10 0 * * * /usr/local/etc/rc.d/adac.sh restart The adac-daemon is restarted, but everytime the job runs it leaves a sh-zombie from the cron-job. By killing the cron-job, the sh-zombie disappears (as it should). Do anyone know why this is happening? Thanks in advance! Best regards, Paul To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message