PR/21896: Jun-ichiro itojun Hagino: Fix botch with passing -1 as the stdin

for the editor instead of 0.
This commit is contained in:
christos 2003-07-14 20:49:14 +00:00
parent 0836c6453a
commit ed5bfb0707
1 changed files with 3 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: edit.c,v 1.16 2003/03/29 21:41:04 christos Exp $ */
/* $NetBSD: edit.c,v 1.17 2003/07/14 20:49:14 christos Exp $ */
/*
* Copyright (c) 1980, 1993
@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)edit.c 8.1 (Berkeley) 6/6/93";
#else
__RCSID("$NetBSD: edit.c,v 1.16 2003/03/29 21:41:04 christos Exp $");
__RCSID("$NetBSD: edit.c,v 1.17 2003/07/14 20:49:14 christos Exp $");
#endif
#endif /* not lint */
@ -210,7 +210,7 @@ run_editor(FILE *fp, off_t size, int editortype, int readonlyflag)
if ((editcmd =
value(editortype == 'e' ? "EDITOR" : "VISUAL")) == NULL)
editcmd = editortype == 'e' ? _PATH_EX : _PATH_VI;
if (run_command(editcmd, 0, -1, -1, tempname, NULL) < 0) {
if (run_command(editcmd, 0, 0, -1, tempname, NULL) < 0) {
(void)unlink(tempname);
goto out;
}