mirror of
https://github.com/skeeto/endlessh.git
synced 2025-02-27 08:40:46 +01:00
Always ignore SIGPIPE
MSG_DONTWAIT doesn't work quite right on OmniOS / Solaris, so also disable SIGPIPE.
This commit is contained in:
parent
2bd2b3ca92
commit
7ac1fbff3b
@ -494,13 +494,14 @@ main(int argc, char **argv)
|
||||
/* Log configuration */
|
||||
config_log(&config);
|
||||
|
||||
/* Install the signal handlers */
|
||||
signal(SIGPIPE, SIG_IGN);
|
||||
{
|
||||
struct sigaction sa = {.sa_handler = sigterm_handler};
|
||||
int r = sigaction(SIGTERM, &sa, 0);
|
||||
if (r == -1)
|
||||
die();
|
||||
}
|
||||
|
||||
{
|
||||
struct sigaction sa = {.sa_handler = sighup_handler};
|
||||
int r = sigaction(SIGHUP, &sa, 0);
|
||||
|
Loading…
Reference in New Issue
Block a user