Always use the default signal handler for ABRT signals.
This will allow coredumps to be generated when tinc is daemonized. Also add the -kABRT option.
This commit is contained in:
parent
eacb5a28fb
commit
257cb6ac60
3 changed files with 6 additions and 6 deletions
|
@ -93,8 +93,7 @@ void sockaddr2str(const sockaddr_t *sa, char **addrstr, char **portstr) {
|
||||||
if(err) {
|
if(err) {
|
||||||
logger(LOG_ERR, "Error while translating addresses: %s",
|
logger(LOG_ERR, "Error while translating addresses: %s",
|
||||||
gai_strerror(err));
|
gai_strerror(err));
|
||||||
raise(SIGFPE);
|
abort();
|
||||||
exit(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
scopeid = strchr(address, '%');
|
scopeid = strchr(address, '%');
|
||||||
|
@ -155,8 +154,7 @@ int sockaddrcmp_noport(const sockaddr_t *a, const sockaddr_t *b) {
|
||||||
default:
|
default:
|
||||||
logger(LOG_ERR, "sockaddrcmp() was called with unknown address family %d, exitting!",
|
logger(LOG_ERR, "sockaddrcmp() was called with unknown address family %d, exitting!",
|
||||||
a->sa.sa_family);
|
a->sa.sa_family);
|
||||||
raise(SIGFPE);
|
abort();
|
||||||
exit(0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -199,8 +197,7 @@ int sockaddrcmp(const sockaddr_t *a, const sockaddr_t *b) {
|
||||||
default:
|
default:
|
||||||
logger(LOG_ERR, "sockaddrcmp() was called with unknown address family %d, exitting!",
|
logger(LOG_ERR, "sockaddrcmp() was called with unknown address family %d, exitting!",
|
||||||
a->sa.sa_family);
|
a->sa.sa_family);
|
||||||
raise(SIGFPE);
|
abort();
|
||||||
exit(0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -546,6 +546,7 @@ static struct {
|
||||||
{SIGCHLD, ignore_signal_handler},
|
{SIGCHLD, ignore_signal_handler},
|
||||||
{SIGALRM, sigalrm_handler},
|
{SIGALRM, sigalrm_handler},
|
||||||
{SIGWINCH, sigwinch_handler},
|
{SIGWINCH, sigwinch_handler},
|
||||||
|
{SIGABRT, SIG_DFL},
|
||||||
{0, NULL}
|
{0, NULL}
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -203,6 +203,8 @@ static bool parse_options(int argc, char **argv) {
|
||||||
kill_tincd = SIGINT;
|
kill_tincd = SIGINT;
|
||||||
else if(!strcasecmp(optarg, "ALRM"))
|
else if(!strcasecmp(optarg, "ALRM"))
|
||||||
kill_tincd = SIGALRM;
|
kill_tincd = SIGALRM;
|
||||||
|
else if(!strcasecmp(optarg, "ABRT"))
|
||||||
|
kill_tincd = SIGABRT;
|
||||||
else {
|
else {
|
||||||
kill_tincd = atoi(optarg);
|
kill_tincd = atoi(optarg);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue