From owner-svn-src-all@freebsd.org Tue Jun 6 21:08:06 2017 Return-Path: Delivered-To: svn-src-all@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 4A0E1BF50F1; Tue, 6 Jun 2017 21:08:06 +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 1A6717B221; Tue, 6 Jun 2017 21:08:06 +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 v56L85nG004231; Tue, 6 Jun 2017 21:08:05 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v56L85NK004230; Tue, 6 Jun 2017 21:08:05 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201706062108.v56L85NK004230@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Tue, 6 Jun 2017 21:08:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319635 - head/bin/sh X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Jun 2017 21:08:06 -0000 Author: jilles Date: Tue Jun 6 21:08:05 2017 New Revision: 319635 URL: https://svnweb.freebsd.org/changeset/base/319635 Log: sh: Call fc -e editor with interrupts enabled. Starting the fc -e editor can execute arbitrary script, and executing arbitrary script with INTOFF in effect may cause unexpected results. This change (together with other changes) serves mainly to allow asserting that INTOFF is not in effect when starting the evaluation of a node. Modified: head/bin/sh/histedit.c Modified: head/bin/sh/histedit.c ============================================================================== --- head/bin/sh/histedit.c Tue Jun 6 21:03:43 2017 (r319634) +++ head/bin/sh/histedit.c Tue Jun 6 21:08:05 2017 (r319635) @@ -376,10 +376,10 @@ histcmd(int argc, char **argv __unused) char *editcmd; fclose(efp); + INTON; editcmd = stalloc(strlen(editor) + strlen(editfile) + 2); sprintf(editcmd, "%s %s", editor, editfile); evalstring(editcmd, 0); /* XXX - should use no JC command */ - INTON; readcmdfile(editfile); /* XXX - should read back - quick tst */ unlink(editfile); }