httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Behlendorf <>
Subject [PATCH] memsetting sigaction
Date Fri, 24 Jan 1997 08:50:51 GMT
> Some members of struct sigaction are not initialized, causing an error
> return status of sigaction.

Adrian Filipi-Martin <> writes:
When starting httpd or restarting it with a SIGHUP, the following is logged 
to the error_log:

[Wed Jan  8 14:21:03 1997] created shared memory segment #4206
[Wed Jan  8 14:21:03 1997] sigaction(SIGSEGV): Invalid argument
[Wed Jan  8 14:21:03 1997] sigaction(SIGBUS): Invalid argument
[Wed Jan  8 14:21:03 1997] Server configured -- resuming normal operations

(Note that the shared memory segment message is only present when the daemon
is send a SIGHUP signal to restart it.)

These error messages do not appear to have any real effect upon the operation
of the server.  I expect they would not matter until it has either a bus or 
a segment fault.

In any case, I looked at the source with gdb and the fact that a sigaction 
structure is not initialized completely in http_main.c seems to be the culprit.
In any case a small patch is included below that does the required clearing of
the sigaction structure and fixes the problem.
Either start the server or restart it with a SIGHUP.  Then hope that you 
do not get lucky and have the aforementioned sigaction structure placed in a 
block of zeroed out memory.
I suspect that invalid arguments are being passed to the sigaction() functions.


View raw message