signal/bsd_signal
Ulrich Drepper
drepper@redhat.com
Wed Sep 6 13:39:00 GMT 2000
What's the correct BSD behavior of signal? The current standard draft
says that bsd_signal (what we also call signal) can be implemented
with:
void (*bsd_signal(int sig, void (*funct)(int)))(int)
{
struct sigaction act, oact;
act.sa_handler = func;
act.sa_flags = SA_RESTART;
sigemptyset(&act.sa_mask);
sigaddset(&act.sa_mask, sig);
if (sigaction(sig, &act, &oact) == -1)
return(SIG_ERR);
return(oact.sa_handler);
}
This is basically what we habe except that we don't habe the
sigaddset() call. Do we have to add it or not? Define signal and
bsd_signal separately?
--
---------------. ,-. 1325 Chesapeake Terrace
Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA
Red Hat `--' drepper at redhat.com `------------------------
More information about the Libc-hacker
mailing list