httpd-dev mailing list archives

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

Not acked - could someone?

>Date: Mon, 1 Jun 1998 05:30:24 -0400 (EDT)
>From: Nick Kew <>
>Organization: WebThing
>Subject: apachectl - very serious bug
>I'm mailing this rather than using your form, because the form
>doesn't permit attachments and I've hacked a quick fix.
>1.3b6.  A search for "apachectl" in your changes file, and in the
>bugs database, doesn't find it.
>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.
>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)
>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
View raw message