Date: Sun, 4 Jun 2017 21:58:02 +0000 (UTC) From: Jilles Tjoelker <jilles@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319591 - head/bin/sh Message-ID: <201706042158.v54Lw2Yh035641@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201706042158.v54Lw2Yh035641>