mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-27 00:06:16 +02:00
parent
49009573bc
commit
90dc50b07c
2 changed files with 2 additions and 1 deletions
|
@ -110,7 +110,7 @@ static void initAndRun(int argc, char * * argv)
|
||||||
/* Catch SIGINT. */
|
/* Catch SIGINT. */
|
||||||
struct sigaction act;
|
struct sigaction act;
|
||||||
act.sa_handler = sigintHandler;
|
act.sa_handler = sigintHandler;
|
||||||
sigfillset(&act.sa_mask);
|
sigemptyset(&act.sa_mask);
|
||||||
act.sa_flags = 0;
|
act.sa_flags = 0;
|
||||||
if (sigaction(SIGINT, &act, 0))
|
if (sigaction(SIGINT, &act, 0))
|
||||||
throw SysError("installing handler for SIGINT");
|
throw SysError("installing handler for SIGINT");
|
||||||
|
|
|
@ -413,6 +413,7 @@ static void restoreSIGPIPE()
|
||||||
struct sigaction act, oact;
|
struct sigaction act, oact;
|
||||||
act.sa_handler = SIG_DFL;
|
act.sa_handler = SIG_DFL;
|
||||||
act.sa_flags = 0;
|
act.sa_flags = 0;
|
||||||
|
sigemptyset(&act.sa_mask);
|
||||||
if (sigaction(SIGPIPE, &act, &oact)) throw SysError("resetting SIGPIPE");
|
if (sigaction(SIGPIPE, &act, &oact)) throw SysError("resetting SIGPIPE");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue