OS/2 and DOS: Be less verbose on signals.
Calling raise() to kill xz when user has pressed C-c is a bit verbose on OS/2 and DOS/DJGPP. Instead of calling raise(), set only the exit status to 1.
This commit is contained in:
parent
5629c4be07
commit
ef364d3abc
|
@ -142,12 +142,19 @@ signals_exit(void)
|
||||||
const int sig = exit_signal;
|
const int sig = exit_signal;
|
||||||
|
|
||||||
if (sig != 0) {
|
if (sig != 0) {
|
||||||
|
#ifdef TUKLIB_DOSLIKE
|
||||||
|
// Don't raise(), set only exit status. This avoids
|
||||||
|
// printing unwanted message about SIGINT when the user
|
||||||
|
// presses C-c.
|
||||||
|
set_exit_status(E_ERROR);
|
||||||
|
#else
|
||||||
struct sigaction sa;
|
struct sigaction sa;
|
||||||
sa.sa_handler = SIG_DFL;
|
sa.sa_handler = SIG_DFL;
|
||||||
sigfillset(&sa.sa_mask);
|
sigfillset(&sa.sa_mask);
|
||||||
sa.sa_flags = 0;
|
sa.sa_flags = 0;
|
||||||
sigaction(sig, &sa, NULL);
|
sigaction(sig, &sa, NULL);
|
||||||
raise(exit_signal);
|
raise(exit_signal);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue