Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(153)

Unified Diff: src/xz/signals.c

Issue 7109015: Update XZ Utils to 5.0.3 (in deps) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/xz/
Patch Set: Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/xz/private.h ('k') | src/xz/suffix.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « src/xz/private.h ('k') | src/xz/suffix.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698