httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Behlendorf <br...@hyperreal.org>
Subject possible bug in apachectl
Date Tue, 02 Jun 1998 07:01:41 GMT

Not acked - could someone?

>Delivered-To: brian@hyperreal.org
>Delivered-To: apache-bugs@apache.org
>Date: Mon, 1 Jun 1998 05:30:24 -0400 (EDT)
>X-Envelope-To: apache-bugs@apache.org
>From: Nick Kew <nick@webthing.com>
>Organization: WebThing
>Subject: apachectl - very serious bug
>To: apache-bugs@apache.org
>X-Status: 
>
>I'm mailing this rather than using your form, because the form
>doesn't permit attachments and I've hacked a quick fix.
>
>Version:
>1.3b6.  A search for "apachectl" in your changes file, and in the
>bugs database, doesn't find it.
>
>Problem:
>Apachectl checks the existence of a pid-file and of the PID it
>references, but fails to check whether the PID is really the httpd.
>
>Symptoms:
>Apachectl may simply fail.  In the worst case, it could kill an
>unrelated process - very naughty indeed.
>
>(I got the problem booting my laptop: the message from apachectl start
>was that httpd (pid 128) was already running; in fact PID 128 was an
unrelated process)
>
>Fix:
>I hacked together a fix you may wish to adopt.  I took the view that
>looking for httpd in the output of ps would be inadequate for those
>of us who may be running more than one httpd, and added locking
>to the pidfile.  I'm not sufficiently familiar with Apache to say
>whether this makes sense, but it's a working fix for systems
>supporting BSD flock() (fcntl() locking fails on forking).
>
>Patch attached.  The diffs are my mods vs the 1.3b6 distribution.
>
>-- 
>Nick Kew
> 
>
>
Mime
View raw message