svn commit: r319591 - head/bin/sh
Jilles Tjoelker
jilles at FreeBSD.org
Sun Jun 4 21:58:03 UTC 2017
Author: jilles
Date: Sun Jun 4 21:58:02 2017
New Revision: 319591
URL: https://svnweb.freebsd.org/changeset/base/319591
Log:
sh: Make sure to process SIGINT if SETINTON re-enables processing.
If INTON re-enables interrupts, it processes any interrupt that occurred
while interrupts were disabled. Make SETINTON do the same.
Modified:
head/bin/sh/error.h
Modified: head/bin/sh/error.h
==============================================================================
--- head/bin/sh/error.h Sun Jun 4 21:39:37 2017 (r319590)
+++ head/bin/sh/error.h Sun Jun 4 21:58:02 2017 (r319591)
@@ -73,7 +73,7 @@ extern volatile sig_atomic_t intpending;
#define INTOFF suppressint++
#define INTON { if (--suppressint == 0 && intpending) onint(); }
#define is_int_on() suppressint
-#define SETINTON(s) suppressint = (s)
+#define SETINTON(s) do { suppressint = (s); if (suppressint == 0 && intpending) onint(); } while (0)
#define FORCEINTON {suppressint = 0; if (intpending) onint();}
#define SET_PENDING_INT intpending = 1
#define CLEAR_PENDING_INT intpending = 0
More information about the svn-src-head
mailing list