httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sander Striker" <>
Subject RE: [PATCH] get worker to wait for workers to exit even for graceless
Date Wed, 01 May 2002 14:23:50 GMT
> From:
> []On Behalf Of Jeff Trawick
> Sent: 01 May 2002 16:04
> "Sander Striker" <> writes:
>>> From:
>>> []On Behalf Of Jeff Trawick
>>> Sent: 01 May 2002 15:36
>>> If somebody wants to play, this is perhaps all that is necessary.  I
>>> need to straighten out a test script problem on the machine that
>>> regularly exhibits the segfault, then try this out there.
>>> The caveat with this is that if a worker thread is doing
>>> time-consuming processing (e.g., lengthy database transaction) then
>>> the pthread_join will hang for a while and the parent will probably
>>> nail us.
>> Meaning? (I hope there isn't a short timeout on the join).
> meaning that the parent process will give up on us ever exiting and
> will send SIGKILL
> there is no timeout on the join
>> I think it is perfectly acceptable to wait for the server to shutdown.
> The long-standing design is that the parent process first tries
> sending SIGTERM to children but will give up after a while and send
> SIGKILL if the child is hung somewhere.

How long is 'a while'?  If this is 'long enough' this will certainly
fall under 'acceptable'.

This just brings us back to the point where we need apr_thread_cancel
(*sigh*).  The only entity that knows if it is in a cancellable state
is the thread itself, not the parent.  The parent can only signal a
thread to cancel and wait.


View raw message