Bug 1406

Summary: multiple PID in /etc/rc.d/init.d/sendmail status
Product: [Retired] Red Hat Linux Reporter: alvherre
Component: initscriptsAssignee: Bill Nottingham <notting>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: 5.2CC: rvokal
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 1999-03-16 00:19:09 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description alvherre 1999-03-03 03:43:59 UTC
If I do "/etc/rc.d/init.d/sendmail status", it reports (at
least) three PIDs. I think it catches 'grep' and 'sh' PIDs,
besides sendmail's own.

Comment 1 Need Real Name 1999-03-08 13:04:59 UTC
Date: Wed, 3 Mar 1999 00:44:21 -0300 (CLST)
From: Alvaro Herrera <alvherre@webhost.cl>
To: bugzilla@redhat.com
Subject: BUG #1406

    [ The following text is in the "ISO-8859-1" character set. ]
    [ Your display is set for the "US-ASCII" character set.  ]
    [ Some characters may be displayed incorrectly. ]

        This patch (applied to /etc/rc.d/init.d/functions) should fix
it:
--- functions.orig      Wed Mar  3 00:43:42 1999
+++ functions   Thu Feb 25 02:18:30 1999
@@ -128,7 +128,9 @@
                return 0
         else

-                pid=`ps auxww | grep '[^[]'$1 | awk '{print $2}'`
+                pid=`ps auxww | grep '[^]/]'$1 | awk '{print $2}'`
                echo $procs
                 if [ "$pid" != "" ] ; then
                         echo "$1 (pid $pid) is running..."


--
"Lo esencial es invisible para los ojos" (A. de Saint Exzpery)
Alvaro Herrera (alvherre@webhost.cl)

Comment 2 David Lawrence 1999-03-14 21:39:59 UTC
I have verified this to be true in our test lab.

[root@test80 /root]# /etc/rc.d/init.d/sendmail status
sendmail (pid 291
1965
1968
1970
1971) is running...
[root@test80 /root]#ps -aux | grep sendmail
warning: `-' deprecated; use `ps aux', not `ps -aux'
root       291  0.0  1.4  1404   920  ?  S   Mar  8   0:00 sendmail:
accepting c
[root@test80 /root]#

Comment 3 Bill Nottingham 1999-03-16 00:19:59 UTC
this has been fixed in a later initscripts release.