>Number: 2285
>Category: os-sunos
>Synopsis: apachectl stop does not stop the httpd because ps -p does not
>work
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: apache
>State: open
>Class: support
>Submitter-Id: apache
>Arrival-Date: Tue May 26 08:40:00 PDT 1998
>Last-Modified:
>Originator: [EMAIL PROTECTED]
>Organization:
apache
>Release: 1.3b7
>Environment:
SunOS 4.1.4 2 sun4m
>Description:
'apachectl stop' does not find the process identified in the httpd.run file
because 'ps -p' does not work on SunOS 4.1.4:
> ps -p
> ps: p: unknown option
> ps: usage: ps [-acCegjklnrStuvwxU] [num] [kernel_name] [c_dump_file]
> [swap_file]
>How-To-Repeat:
>Fix:
replace the line
PS=`ps -p $PID 2>/dev/null | tail -1 | grep $PID`
by the lines
OS=`uname -sr`
if [ "$OS" = "SunOS 4.1.4" ]; then
PS=`ps $PID 2>/dev/null | tail -1 | grep $PID`
else
PS=`ps -p $PID 2>/dev/null | tail -1 | grep $PID`
fi
Then it will work for SunOS 4.1.4 also; i do not know how to just
identifying SunOS 4 with sh (and how many non-4.1.4 may be still out there)
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, ]
[you need to include <[EMAIL PROTECTED]> in the Cc line ]
[and leave the subject line UNCHANGED. This is not done]
[automatically because of the potential for mail loops. ]