mirror of
https://github.com/ckolivas/lrzip.git
synced 2025-12-06 07:12:00 +01:00
Graciously handle signals when in a detached state.
This commit is contained in:
parent
073cdb2175
commit
71bbbe9e3d
3
main.c
3
main.c
|
|
@ -147,6 +147,8 @@ static void sighandler(int sig __UNUSED__)
|
|||
{
|
||||
signal(sig, SIG_IGN);
|
||||
signal(SIGTERM, SIG_IGN);
|
||||
signal(SIGTTIN, SIG_IGN);
|
||||
signal(SIGTTOU, SIG_IGN);
|
||||
print_err("Interrupted\n");
|
||||
fatal_exit(&local_control);
|
||||
}
|
||||
|
|
@ -656,6 +658,7 @@ recursion:
|
|||
|
||||
if (STDIN)
|
||||
control->inFILE = stdin;
|
||||
|
||||
/* Implement signal handler only once flags are set */
|
||||
sigemptyset(&handler.sa_mask);
|
||||
handler.sa_flags = 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue