Author: jilles Date: Sun May 15 17:00:43 2011 New Revision: 221970 URL: http://svn.freebsd.org/changeset/base/221970
Log: sh: Avoid close(-1) when evaluating a multi-command pipeline. Valgrind complains about this. Modified: head/bin/sh/eval.c Modified: head/bin/sh/eval.c ============================================================================== --- head/bin/sh/eval.c Sun May 15 16:40:42 2011 (r221969) +++ head/bin/sh/eval.c Sun May 15 17:00:43 2011 (r221970) @@ -552,7 +552,8 @@ evalpipe(union node *n) if (prevfd >= 0) close(prevfd); prevfd = pip[0]; - close(pip[1]); + if (pip[1] != -1) + close(pip[1]); } INTON; if (n->npipe.backgnd == 0) { _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"