Ignore SIGPIPE in fishd. Fixes #1084

This commit is contained in:
ridiculousfish 2014-02-14 10:12:41 -08:00 committed by David Adam
parent 7f4908b0db
commit 0986b6d991

View file

@ -706,13 +706,14 @@ static void daemonize()
setup_fork_guards();
/*
Make fishd ignore the HUP signal.
Make fishd ignore the HUP and PIPE signals.
*/
struct sigaction act;
sigemptyset(& act.sa_mask);
act.sa_flags=0;
act.sa_handler=SIG_IGN;
sigaction(SIGHUP, &act, 0);
sigaction(SIGPIPE, &act, 0);
/*
Make fishd save and exit on the TERM signal.