www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dirk Niemeyer <dirk.nieme...@airbus.dasa.de>
Subject os-sunos/2285: apachectl stop does not stop the httpd because ps -p does not work
Date Tue, 26 May 1998 15:33:53 GMT

>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:     dirk.niemeyer@airbus.dasa.de
>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 <apbugs@Apache.Org> in the Cc line ]
[and leave the subject line UNCHANGED.  This is not done]
[automatically because of the potential for mail loops. ]




Mime
View raw message