[svn-r11428] Purpose:

Bug fix.

Description:
In some racing condition, the process ID file might be removed just
the moment before timekeeper cats its content. When that happens,
the $pid is a blank.  Timekeeper was not prepared for this.

Solution:
Added code to verify $pid is some number before proceeding.

Platforms tested:
Tested by hand only.
This commit is contained in:
Albert Cheng 2005-09-17 20:41:57 -05:00
parent f8e7064269
commit 28bb8b4694

View File

@ -100,7 +100,7 @@ if [ -z "$debugflag" ]; then
if [ -f $x ]; then if [ -f $x ]; then
pid=`cat $x` pid=`cat $x`
# check if process is still around # check if process is still around
if ps $pid > /dev/null; then if test X$pid \!= X && ps -p $pid > /dev/null; then
echo "terminating process $x ($pid)" echo "terminating process $x ($pid)"
kill -HUP $pid kill -HUP $pid
fi fi