cookutils diff cooker @ rev 274
cooker: check /var/run/cooker.pid
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Fri Dec 23 15:32:52 2011 +0100 (2011-12-23) |
parents | 89f254f33af3 |
children | c71b4f095cec |
line diff
1.1 --- a/cooker Mon Nov 07 10:38:57 2011 +0100 1.2 +++ b/cooker Fri Dec 23 15:32:52 2011 +0100 1.3 @@ -373,8 +373,11 @@ 1.4 cooklist=$CACHE/commits 1.5 if [ -f "$pidfile" ]; then 1.6 pid=$(cat /var/run/cooker.pid) 1.7 - gettext -e "\nStill cooking latest commits with pid:" 1.8 - echo -e " $pid\n" && exit 0 1.9 + if [ -s /proc/$pid/status ]; then 1.10 + gettext -e "\nStill cooking latest commits with pid:" 1.11 + echo -e " $pid\n" && exit 0 1.12 + fi 1.13 + rm -f "$pidfile" 1.14 fi 1.15 1.16 # Start and get a PID file.