gaz...@shell.xmission.com (Kenny McCormack) writes:
>In article <
ygazgcf...@akutech.de>, Ralf Fassel <
ral...@gmx.de> wrote:
>...
>>I think that according to signal(2) that should rather be
>>
>> void myhandler(int sig) {
>> ...
>> }
>>
>>
>> NAME
>> signal - ANSI C signal handling
>> SYNOPSIS
>> #include <signal.h>
>> typedef void (*sighandler_t)(int);
>>
>>Note that 'sighandler_t' is the typedef for the _signal handler_ (to be
>>used in the declaration of signal()), not the return value of the signal
>>handler. The return value of the signal handler is void, taking one
>>integer argument.
>
>Yes, thanks. That seems to fix things.
>
>The funny thing is that (at least on my system), nowhere in "man signal"
>does it actually tell you how to declare the signal handler function (that
>is, as simply "void"). You could say that this is implicit in saying that
>sighandler_t is a pointer to a void function, so the thing must itself be a
>void function.