1234567891011121314151617181920212223242526272829303132333435363738394041 |
- #define _GNU_SOURCE
- #include <errno.h>
- #define __need_NULL
- #include <stddef.h>
- #include <signal.h>
- #include <string.h> /* For the real memset prototype. */
- int
- sigignore (sig)
- int sig;
- {
- struct sigaction act;
- act.sa_handler = SIG_IGN;
- if (__sigemptyset (&act.sa_mask) < 0)
- return -1;
- act.sa_flags = 0;
- return sigaction (sig, &act, NULL);
- }
|