mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-17 18:39:23 +00:00
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:
parent
bc18d616ad
commit
81fc57ca0d
@ -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>
|
2004-12-10 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
|
||||||
|
|
||||||
* log.c: (zlog_signal,_zlog_assert_failed) Change logging level back to
|
* log.c: (zlog_signal,_zlog_assert_failed) Change logging level back to
|
||||||
|
@ -191,7 +191,6 @@ trap_default_signals(void)
|
|||||||
static const int exit_signals[] = {
|
static const int exit_signals[] = {
|
||||||
SIGHUP,
|
SIGHUP,
|
||||||
SIGINT,
|
SIGINT,
|
||||||
SIGPIPE,
|
|
||||||
SIGALRM,
|
SIGALRM,
|
||||||
SIGTERM,
|
SIGTERM,
|
||||||
SIGUSR1,
|
SIGUSR1,
|
||||||
@ -206,19 +205,23 @@ trap_default_signals(void)
|
|||||||
SIGSTKFLT,
|
SIGSTKFLT,
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
static const int ignore_signals[] = {
|
||||||
|
SIGPIPE,
|
||||||
|
};
|
||||||
static const struct {
|
static const struct {
|
||||||
const int *sigs;
|
const int *sigs;
|
||||||
int nsigs;
|
u_int nsigs;
|
||||||
void (*handler)(int);
|
void (*handler)(int);
|
||||||
} sigmap[2] = {
|
} sigmap[] = {
|
||||||
{ core_signals, sizeof(core_signals)/sizeof(core_signals[0]),core_handler },
|
{ core_signals, sizeof(core_signals)/sizeof(core_signals[0]),core_handler },
|
||||||
{ exit_signals, sizeof(exit_signals)/sizeof(exit_signals[0]),exit_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++)
|
for (j = 0; j < sigmap[i].nsigs; j++)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user