Date: Sun, 14 May 2017 20:17:50 +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-11@freebsd.org Subject: svn commit: r318279 - in stable/11/bin/sh: . tests/builtins Message-ID: <201705142017.v4EKHop0011008@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jilles Date: Sun May 14 20:17:50 2017 New Revision: 318279 URL: https://svnweb.freebsd.org/changeset/base/318279 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/11/bin/sh/tests/builtins/locale2.0 - copied unchanged from r317912, head/bin/sh/tests/builtins/locale2.0 Modified: stable/11/bin/sh/tests/builtins/Makefile stable/11/bin/sh/var.c Directory Properties: stable/11/ (props changed) Modified: stable/11/bin/sh/tests/builtins/Makefile ============================================================================== --- stable/11/bin/sh/tests/builtins/Makefile Sun May 14 18:47:09 2017 (r318278) +++ stable/11/bin/sh/tests/builtins/Makefile Sun May 14 20:17:50 2017 (r318279) @@ -117,6 +117,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 Copied: stable/11/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/11/bin/sh/tests/builtins/locale2.0 Sun May 14 20:17:50 2017 (r318279, 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/11/bin/sh/var.c ============================================================================== --- stable/11/bin/sh/var.c Sun May 14 18:47:09 2017 (r318278) +++ stable/11/bin/sh/var.c Sun May 14 20:17:50 2017 (r318279) @@ -512,7 +512,7 @@ bltinunsetlocale(void) if (localevar(cmdenviron->args[i])) { setlocale(LC_ALL, ""); updatecharset(); - return; + break; } } INTON;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201705142017.v4EKHop0011008>