svn commit: r320531 - in stable/10/bin/sh: . tests/builtins
Jilles Tjoelker
jilles at FreeBSD.org
Sat Jul 1 12:57:02 UTC 2017
Author: jilles
Date: Sat Jul 1 12:57:00 2017
New Revision: 320531
URL: https://svnweb.freebsd.org/changeset/base/320531
Log:
MFC r317912: 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.
Added:
stable/10/bin/sh/tests/builtins/locale2.0
- copied unchanged from r317912, head/bin/sh/tests/builtins/locale2.0
Modified:
stable/10/bin/sh/tests/builtins/Makefile
stable/10/bin/sh/var.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/bin/sh/tests/builtins/Makefile
==============================================================================
--- stable/10/bin/sh/tests/builtins/Makefile Sat Jul 1 10:04:42 2017 (r320530)
+++ stable/10/bin/sh/tests/builtins/Makefile Sat Jul 1 12:57:00 2017 (r320531)
@@ -100,6 +100,7 @@ FILES+= local4.0
.if ${MK_NLS} != "no"
FILES+= locale1.0
.endif
+FILES+= locale2.0
FILES+= printf1.0
FILES+= printf2.0
FILES+= printf3.0
Copied: stable/10/bin/sh/tests/builtins/locale2.0 (from r317912, head/bin/sh/tests/builtins/locale2.0)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ stable/10/bin/sh/tests/builtins/locale2.0 Sat Jul 1 12:57:00 2017 (r320531, copy of r317912, head/bin/sh/tests/builtins/locale2.0)
@@ -0,0 +1,5 @@
+# $FreeBSD$
+
+$SH -c 'LC_ALL=C true; kill -INT $$; echo continued'
+r=$?
+[ "$r" -gt 128 ] && [ "$(kill -l "$r")" = INT ]
Modified: stable/10/bin/sh/var.c
==============================================================================
--- stable/10/bin/sh/var.c Sat Jul 1 10:04:42 2017 (r320530)
+++ stable/10/bin/sh/var.c Sat Jul 1 12:57:00 2017 (r320531)
@@ -506,7 +506,7 @@ bltinunsetlocale(void)
if (localevar(lp->text)) {
setlocale(LC_ALL, "");
updatecharset();
- return;
+ break;
}
}
INTON;
More information about the svn-src-all
mailing list