[sudo-users] How sudo handles signals
nunojpg at gmail.com
Fri Dec 16 20:17:10 EST 2011
void sigint_handler(int sig)
int main(int argc, char* argv)
nuno at nuno-boxRTx64:~/Desktop$ gcc test.c -o test
nuno at nuno-boxRTx64:~/Desktop$ sudo ./test
We can see more than one SIGINT for each ^C (but not always).
2011/12/16 Todd C. Miller <Todd.Miller at courtesan.com>:
> I don't see that behavior myself, but from the code it seems possible
> if you do not have log_output enabled.
> The main sudo process forwards signals to the command it is running
> which is fine in general. However, in the case of keyboard-generated
> signals it may be possible for both processes to receive SIGINT and
> thus for the command to get the signal twice. As I said, I don't
> see that with a simple test program. Can you share the code you
> are using?
> - todd
More information about the sudo-users