svn commit: r252359 - head/bin/sh
Jilles Tjoelker
jilles at FreeBSD.org
Fri Jun 28 21:47:09 UTC 2013
Author: jilles
Date: Fri Jun 28 21:47:08 2013
New Revision: 252359
URL: http://svnweb.freebsd.org/changeset/base/252359
Log:
sh: Do not close(-1) if pipe() fails.
Modified:
head/bin/sh/eval.c
Modified: head/bin/sh/eval.c
==============================================================================
--- head/bin/sh/eval.c Fri Jun 28 21:13:19 2013 (r252358)
+++ head/bin/sh/eval.c Fri Jun 28 21:47:08 2013 (r252359)
@@ -589,7 +589,8 @@ evalpipe(union node *n)
pip[1] = -1;
if (lp->next) {
if (pipe(pip) < 0) {
- close(prevfd);
+ if (prevfd >= 0)
+ close(prevfd);
error("Pipe call failed: %s", strerror(errno));
}
}
More information about the svn-src-head
mailing list