I found a race condition in LFS-4.1 function killproc(), but the same
code is found in the LFS-6.1.1 I recently installed.  LFS-6.1.1 may
provide a workaround I can't test, but it's still a workaround.

The condition is this: when running Apache, it will spawn a number of
httpd helper daemons, as specified in its config file.  When shutting
httpd down, killproc gets a list of all the httpd daemons, which it is
going to try to kill.  Meanwhile, sending a TERM to the first httpd
daemon will cause it to try kill all its children.  It may successfully
kill some daemons that killproc will later try to kill, and receive an
error.  I suggest killproc should check error codes returned by kill, and
if the pid is already gone, that's acceptable.  

It looks like in LFS-6.1.1 the shutdown script could just kill the first,
and hope it gets all the rest.  But having the shutdown script killing
any stragglers is also appealing.

Paul Rogers  ([EMAIL PROTECTED])
http://www.xprt.net/~pgrogers/
http://www.geocities.com/paulgrogers/
Rogers' Second Law: "Everything you do communicates."
(I do not personally endorse any additions after this line. TANSTAAFL 
:-)

-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/lfs/faq.html
Unsubscribe: See the above information page

Reply via email to