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.
This commit is contained in:
Jilles Tjoelker 2017-06-06 21:08:05 +00:00
parent 9086e0e068
commit 79fb1e455e
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=319635

View File

@ -376,10 +376,10 @@ histcmd(int argc, char **argv __unused)
char *editcmd; char *editcmd;
fclose(efp); fclose(efp);
INTON;
editcmd = stalloc(strlen(editor) + strlen(editfile) + 2); editcmd = stalloc(strlen(editor) + strlen(editfile) + 2);
sprintf(editcmd, "%s %s", editor, editfile); sprintf(editcmd, "%s %s", editor, editfile);
evalstring(editcmd, 0); /* XXX - should use no JC command */ evalstring(editcmd, 0); /* XXX - should use no JC command */
INTON;
readcmdfile(editfile); /* XXX - should read back - quick tst */ readcmdfile(editfile); /* XXX - should read back - quick tst */
unlink(editfile); unlink(editfile);
} }