>Number: 792
>Category: general
>Synopsis: race condition with SIGUSR1 graceful restart
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: apache (Apache HTTP Project)
>State: open
>Class: sw-bug
>Submitter-Id: apache
>Arrival-Date: Thu Jun 26 08:50:01 1997
>Originator: [EMAIL PROTECTED]
>Organization:
apache
>Release: 1.2.0
>Environment:
any
>Description:
There is a problem with the signal handling of SIGUSR1 in child_main()
in http_main.c around line 1775. If a SIGUSR1 comes too early in the
for loop it will be ignored and the process will wait in accept.
It's none too critical, but could be improved.
>How-To-Repeat:
This condition can be tested by putting a pause() or sleep in the
for loop just before the accept and then sending a SIGUSR1 to the
process.
>Fix:
It needs a long jump. Something like:
if (ap_setjmp(deferred_die_jump_buffer, 1) == 0) {
signal(SIGUSR1, deferred_die_and_jump_handler);
}
while (! deferred_die) {
clen = sizeof();
csd = accept();
if (csd >=0 || errno != EINTR) break;
}
signal(SIGUSR1, deferred_die_handler)%3
>Audit-Trail:
>Unformatted: