Changed ps -el to ps -e: ps -el reported X as being alive instead of <defunct>
git-svn-id: file:///home/hardaker/lib/sf-bkups/net-snmp-convert-svnrepo/trunk@99 06827809-a52a-0410-b366-d66718629ded
diff --git a/local/fixproc b/local/fixproc
index 44a0c04..f7bdf49 100755
--- a/local/fixproc
+++ b/local/fixproc
@@ -156,7 +156,7 @@
# do ps, check to see if min <= no. of processes <= max
$! = $fixproc_error;
- open (command, "/bin/ps -el | /bin/grep $proc | /bin/wc -l |")
+ open (command, "/bin/ps -e | /bin/grep $proc | /bin/wc -l |")
|| die "$0: can't run ps-grep-wc command\n";
$proc_count = <command>;
if (($proc_count < $min{$proc}) || ($proc_count > $max{$proc}))
@@ -176,27 +176,27 @@
# first try kill
$! = $fixproc_error;
- open (command, "/bin/ps -el | /bin/grep $proc |")
+ open (command, "/bin/ps -e | /bin/grep $proc |")
|| die "$0: can't run ps-grep-awk command\n";
while (<command>)
{
- # match the 4th field of ps -el
+ # match the 4th field of ps -e
$! = $fixproc_error;
- /^\s*\d+\s+\S+\s+\d+\s+(\d+)\s+/ || die "$0: can't match ps -el output\n";
+ /^\s*\d+\s+\S+\s+\d+\s+(\d+)\s+/ || die "$0: can't match ps -e output\n";
system "kill $1";
}
# if process still exist, try kill -9
sleep 2;
$! = $fixproc_error;
- open (command, "/bin/ps -el | /bin/grep $proc |")
+ open (command, "/bin/ps -e | /bin/grep $proc |")
|| die "$0: can't run ps-grep-awk command\n";
$second_kill_needed = 0;
while (<command>)
{
- # match the 4th field of ps -el
+ # match the 4th field of ps -e
$! = $fixproc_error;
- /^\s*\d+\s+\S+\d+\s+(\d+)\s+/ || die "$0: can't match ps -el output\n";
+ /^\s*\d+\s+\S+\d+\s+(\d+)\s+/ || die "$0: can't match ps -e output\n";
system "kill -9 $1";
$second_kill_needed = 1;
}
@@ -205,7 +205,7 @@
# see if kill -9 worked
sleep 2;
$! = $fixproc_error;
- open (command, "/bin/ps -el | /bin/grep $proc |")
+ open (command, "/bin/ps -e | /bin/grep $proc |")
|| die "$0: can't run ps-grep-awk command\n";
while (<command>)
{ # a process still exist, return error