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)); } } _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"