Commit c4ab05d9 authored by Sigmund Augdal's avatar Sigmund Augdal

attempt at making a more robust process identification

the output of ps depends on the COLUMNS environment variable (and any number of other unknowns) and does not seem to be reliable for scripting
parent 48bed470
...@@ -31,7 +31,7 @@ status() ...@@ -31,7 +31,7 @@ status()
fi fi
for pid in $(cat $PIDFILE) ; do for pid in $(cat $PIDFILE) ; do
if ! ps --no-headers p "$pid" | grep $EXE > /dev/null ; then if ! grep -q $EXE "/proc/$pid/cmdline" ; then
# program running, bogus pidfile # program running, bogus pidfile
return 1 return 1
fi fi
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment