mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-13 21:44:16 +00:00
Ignore SIGPIPE in fishd. Fixes #1084
This commit is contained in:
parent
7f4908b0db
commit
0986b6d991
1 changed files with 2 additions and 1 deletions
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue