2004-12-15 Andrew J. Schorr <ajschorr@alumni.princeton.edu>

* sigevent.c: (trap_default_signals) Ignore SIGPIPE instead of exiting.
This commit is contained in:
ajs 2004-12-15 17:41:14 +00:00
parent bc18d616ad
commit 81fc57ca0d
2 changed files with 13 additions and 6 deletions

View File

@ -1,3 +1,7 @@
2004-12-15 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* sigevent.c: (trap_default_signals) Ignore SIGPIPE instead of exiting.
2004-12-10 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* log.c: (zlog_signal,_zlog_assert_failed) Change logging level back to

View File

@ -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++)
{