[PATCH] libc: fix signal handling in system()
Richard Braun
rbraun at sceen.net
Tue Jan 17 06:38:57 UTC 2012
On Mon, Jan 16, 2012 at 10:52:58PM -0500, Mike Frysinger wrote:
> this leaves the other fields of sigaction uninitialized. i think we need:
>
> if (command == 0)
> return 1;
>
> + memset(&sa, 0, sizeof(sa));
> sa.sa_handler = SIG_IGN;
> sigemptyset(&sa.sa_mask);
> - sa.sa_flags = 0;
> sigaction(SIGQUIT, &sa, &save_quit);
> sigaction(SIGINT, &sa, &save_int);
> sigaddset(&sa.sa_mask, SIGCHLD);
I didn't realize this. But then, do we need to call sigemptyset() ?
--
Richard Braun
More information about the uClibc
mailing list