freebsd-dev/bin/sh
Jilles Tjoelker bd11190091 sh: Do not ignore INTOFF during a trap
INTOFF postpones SIGINT processing and INTON enables it again. This is
important so an interactive shell can return to the top level prompt when
Ctrl+C is pressed.

Given that INTON is automatically done when a builtin completes, the part
where onsig() ignores suppressint when in_dotrap is true is both unnecessary
and unsafe. If the trap is for some other signal than SIGINT, arbitrary code
could have been interrupted.

Historically, INTOFF remained in effect for longer.

Reviewed by:	bdrewery
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D25270
2020-07-09 20:53:56 +00:00
..
bltin
funcs
tests sh/tests: Re-enable bin.sh.execution.functional_test.bg12.0 2020-06-28 21:33:08 +00:00
alias.c
alias.h
arith_yacc.c
arith_yacc.h
arith_yylex.c
arith.h
builtins.def sh: Remove remnants to compile out fc completely 2020-04-22 21:45:43 +00:00
cd.c
cd.h
dot.profile
dot.shrc vfs: add restrictions to read(2) of a directory [1/2] 2020-06-04 18:09:55 +00:00
error.c
error.h
eval.c
eval.h
exec.c sh: Allow more scripts without #! 2020-05-30 16:00:49 +00:00
exec.h
expand.c
expand.h
histedit.c Fix build with NO_HISTORY set 2020-04-21 00:37:55 +00:00
input.c sh: remove duplicate el definition 2020-03-28 17:02:32 +00:00
input.h
jobs.c sh: Fix double INTON with vfork 2020-05-16 16:29:23 +00:00
jobs.h
mail.c
mail.h
main.c
main.h
Makefile Bump WARNS for sh(1). 2020-04-01 15:12:51 +00:00
Makefile.depend
memalloc.c sh: Assert INTOFF rather than applying it in ck* 2020-04-28 20:34:27 +00:00
memalloc.h
miscbltin.c sh: Remove a comment that was obsoleted by r358152 2020-05-22 14:46:23 +00:00
mkbuiltins sh: Remove remnants to compile out fc completely 2020-04-22 21:45:43 +00:00
mknodes.c
mksyntax.c
mktokens
myhistedit.h
mystring.c
mystring.h
nodes.c.pat
nodetypes
options.c
options.h
output.c
output.h
parser.c
parser.h
profile
redir.c
redir.h
sh.1 Fix description of the "\$" sequence for PS1 2020-07-06 10:05:35 +00:00
shell.h
show.c
show.h
TOUR
trap.c sh: Do not ignore INTOFF during a trap 2020-07-09 20:53:56 +00:00
trap.h
var.c
var.h