Date: Thu, 26 Sep 2002 11:30:47 +0200 (MEST) From: Paul Everlund <tdv94ped@cs.umu.se> To: freebsd-questions@freebsd.org Subject: Cron leaving a zombie Message-ID: <Pine.GSO.4.44.0209261121260.29630-100000@kvist.cs.umu.se>
index | next in thread | raw e-mail
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
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.44.0209261121260.29630-100000>
