summaryrefslogtreecommitdiffstats
path: root/lib/sigevent.c
diff options
context:
space:
mode:
authorajs <ajs>2004-12-15 18:41:14 +0100
committerajs <ajs>2004-12-15 18:41:14 +0100
commit81fc57ca0d743a6abe577c4f0b316bfb570e45be (patch)
tree846f58014c25a74449c1ea19e075f6f0a23cc723 /lib/sigevent.c
parent2004-12-15 Andrew J. Schorr <ajschorr@alumni.princeton.edu> (diff)
downloadfrr-81fc57ca0d743a6abe577c4f0b316bfb570e45be.tar.xz
frr-81fc57ca0d743a6abe577c4f0b316bfb570e45be.zip
2004-12-15 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* sigevent.c: (trap_default_signals) Ignore SIGPIPE instead of exiting.
Diffstat (limited to 'lib/sigevent.c')
-rw-r--r--lib/sigevent.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/lib/sigevent.c b/lib/sigevent.c
index 53503a7a9..5ac226a4c 100644
--- a/lib/sigevent.c
+++ b/lib/sigevent.c
@@ -191,7 +191,6 @@ trap_default_signals(void)
static const int exit_signals[] = {
SIGHUP,
SIGINT,
- SIGPIPE,
SIGALRM,
SIGTERM,
SIGUSR1,
@@ -206,19 +205,23 @@ trap_default_signals(void)
SIGSTKFLT,
#endif
};
+ static const int ignore_signals[] = {
+ SIGPIPE,
+ };
static const struct {
const int *sigs;
- int nsigs;
+ u_int nsigs;
void (*handler)(int);
- } sigmap[2] = {
+ } sigmap[] = {
{ core_signals, sizeof(core_signals)/sizeof(core_signals[0]),core_handler },
{ exit_signals, sizeof(exit_signals)/sizeof(exit_signals[0]),exit_handler },
+ { ignore_signals, sizeof(ignore_signals)/sizeof(ignore_signals[0]),SIG_IGN},
};
- int i;
+ u_int i;
- for (i = 0; i < 2; i++)
+ for (i = 0; i < sizeof(sigmap)/sizeof(sigmap[0]); i++)
{
- int j;
+ u_int j;
for (j = 0; j < sigmap[i].nsigs; j++)
{