diff --git a/bin/sh/jobs.c b/bin/sh/jobs.c index 2475787c1da9..c46e526eab67 100644 --- a/bin/sh/jobs.c +++ b/bin/sh/jobs.c @@ -1008,9 +1008,11 @@ vforkexecshell(struct job *jp, char **argv, char **envp, const char *path, int i pid_t pid; struct jmploc jmploc; struct jmploc *savehandler; + int inton; TRACE(("vforkexecshell(%%%td, %s, %p) called\n", jp - jobtab, argv[0], (void *)pip)); + inton = is_int_on(); INTOFF; flushall(); savehandler = handler; @@ -1045,7 +1047,7 @@ vforkexecshell(struct job *jp, char **argv, char **envp, const char *path, int i setcurjob(jp); #endif } - INTON; + SETINTON(inton); TRACE(("In parent shell: child = %d\n", (int)pid)); return pid; } diff --git a/bin/sh/tests/execution/Makefile b/bin/sh/tests/execution/Makefile index 983db692faff..526541d50994 100644 --- a/bin/sh/tests/execution/Makefile +++ b/bin/sh/tests/execution/Makefile @@ -64,6 +64,7 @@ ${PACKAGE}FILES+= subshell2.0 ${PACKAGE}FILES+= subshell3.0 ${PACKAGE}FILES+= subshell4.0 ${PACKAGE}FILES+= unknown1.0 +${PACKAGE}FILES+= unknown2.0 ${PACKAGE}FILES+= var-assign1.0 .include diff --git a/bin/sh/tests/execution/unknown2.0 b/bin/sh/tests/execution/unknown2.0 new file mode 100644 index 000000000000..d316e01949f6 --- /dev/null +++ b/bin/sh/tests/execution/unknown2.0 @@ -0,0 +1,6 @@ +# $FreeBSD$ + +{ + : $(/var/empty/nosuchtool) + : $(:) +} 2>/dev/null