From 79fb1e455e2e501c1ac501ed8dd6832e29c76ac0 Mon Sep 17 00:00:00 2001 From: Jilles Tjoelker Date: Tue, 6 Jun 2017 21:08:05 +0000 Subject: [PATCH] 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. --- bin/sh/histedit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/sh/histedit.c b/bin/sh/histedit.c index b6ea93e97848..8e2f927cfe06 100644 --- a/bin/sh/histedit.c +++ b/bin/sh/histedit.c @@ -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); }