You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Troels Arvin <ta...@mdb.ku.dk> on 1998/09/03 07:16:37 UTC

general/2947: apachectl doesn't delete pid-file after stopping Apache

>Number:         2947
>Category:       general
>Synopsis:       apachectl doesn't delete pid-file after stopping Apache
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Wed Sep  2 22:20:00 PDT 1998
>Last-Modified:
>Originator:     tarvin@mdb.ku.dk
>Organization:
apache
>Release:        1.3.1
>Environment:
Redhat Linux 5.1
Apache version 1.3.1 (not the Apache that comes with Redhat)
Compiler: irrelevant
Shell: /bin/sh points to bash
>Description:
The apachectl support-script doesn't clean up the pid-file after stopping httpd. This results in an error message next time Apache is started.
>How-To-Repeat:
Do a "apachectl stop"; the pid-file remains in the /path_to_apache/var/run directory. This results in an error message the next time "apachectl start" is run.
>Fix:
I suggest that a line be added after line 84 (which is "echo "$0 $ARG: httpd stopped""):
rm -f $PIDFILE

- so that the "stop" portion will read:
=======================================================
    stop)
        if [ $RUNNING -eq 0 ]; then
            echo "$0 $ARG: $STATUS"
            continue
        fi
        if kill $PID ; then
            echo "$0 $ARG: httpd stopped"
            rm -f $PIDFILE
        else
            echo "$0 $ARG: httpd could not be stopped"
            ERROR=4
        fi
        ;;
=======================================================
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, ]
[you need to include <ap...@Apache.Org> in the Cc line ]
[and leave the subject line UNCHANGED.  This is not done]
[automatically because of the potential for mail loops. ]
[If you do not include this Cc, your reply may be ig-   ]
[nored unless you are responding to an explicit request ]
[from a developer.                                      ]
[Reply only with text; DO NOT SEND ATTACHMENTS!         ]