From owner-svn-src-stable-11@freebsd.org Sun May 14 20:17:52 2017 Return-Path: Delivered-To: svn-src-stable-11@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 66F4FD6D42B; Sun, 14 May 2017 20:17:52 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C9371C96; Sun, 14 May 2017 20:17:52 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4EKHplk011011; Sun, 14 May 2017 20:17:51 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4EKHop0011008; Sun, 14 May 2017 20:17:50 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201705142017.v4EKHop0011008@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 14 May 2017 20:17:50 +0000 (UTC) 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 X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-11@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 11-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 May 2017 20:17:52 -0000 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;