| Index: src/xz/signals.c
|
| ===================================================================
|
| --- src/xz/signals.c (revision 50504)
|
| +++ src/xz/signals.c (working copy)
|
| @@ -71,6 +71,12 @@
|
| for (size_t i = 0; i < ARRAY_SIZE(sigs); ++i)
|
| sigaddset(&hooked_signals, sigs[i]);
|
|
|
| +#ifdef SIGALRM
|
| + // Add also the signals from message.c to hooked_signals.
|
| + for (size_t i = 0; message_progress_sigs[i] != 0; ++i)
|
| + sigaddset(&hooked_signals, message_progress_sigs[i]);
|
| +#endif
|
| +
|
| struct sigaction sa;
|
|
|
| // All the signals that we handle we also blocked while the signal
|
| @@ -142,12 +148,19 @@
|
| const int sig = exit_signal;
|
|
|
| if (sig != 0) {
|
| +#if defined(TUKLIB_DOSLIKE) || defined(__VMS)
|
| + // 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;
|
| sa.sa_handler = SIG_DFL;
|
| sigfillset(&sa.sa_mask);
|
| sa.sa_flags = 0;
|
| sigaction(sig, &sa, NULL);
|
| raise(exit_signal);
|
| +#endif
|
| }
|
|
|
| return;
|
| @@ -166,7 +179,7 @@
|
| // console window.
|
|
|
| static BOOL WINAPI
|
| -signal_handler(DWORD type lzma_attribute((unused)))
|
| +signal_handler(DWORD type lzma_attribute((__unused__)))
|
| {
|
| // Since we don't get a signal number which we could raise() at
|
| // signals_exit() like on POSIX, just set the exit status to
|
|
|