Date: Sat, 1 Jul 2017 12:57:00 +0000 (UTC) From: Jilles Tjoelker <jilles@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r320531 - in stable/10/bin/sh: . tests/builtins Message-ID: <201707011257.v61Cv01m009869@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201707011257.v61Cv01m009869>