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
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to