sh: Fix INTOFF leak after a builtin with different locale settings.

After executing a builtin with different locale settings such as
  LC_ALL=C true
SIGINT handling was left disabled indefinitely.

MFC after:	1 week
This commit is contained in:
Jilles Tjoelker 2017-05-07 19:49:46 +00:00
parent 853e9ff25c
commit 3f2da875f7
3 changed files with 7 additions and 1 deletions

View File

@ -120,6 +120,7 @@ ${PACKAGE}FILES+= local7.0
.if ${MK_NLS} != "no"
${PACKAGE}FILES+= locale1.0
.endif
${PACKAGE}FILES+= locale2.0
${PACKAGE}FILES+= printf1.0
${PACKAGE}FILES+= printf2.0
${PACKAGE}FILES+= printf3.0

View File

@ -0,0 +1,5 @@
# $FreeBSD$
$SH -c 'LC_ALL=C true; kill -INT $$; echo continued'
r=$?
[ "$r" -gt 128 ] && [ "$(kill -l "$r")" = INT ]

View File

@ -513,7 +513,7 @@ bltinunsetlocale(void)
if (localevar(cmdenviron->args[i])) {
setlocale(LC_ALL, "");
updatecharset();
return;
break;
}
}
INTON;