From 2e9061daf8f202eb770dff62a84e1dac7b4af1e3 Mon Sep 17 00:00:00 2001 From: John Polstra Date: Wed, 20 Mar 1996 19:05:59 +0000 Subject: [PATCH] Close a file descriptor that I had (harmlessly) left open in a child process. --- usr.sbin/pkg_install/create/perform.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/usr.sbin/pkg_install/create/perform.c b/usr.sbin/pkg_install/create/perform.c index 178b3a4307f8..c37459fc381b 100644 --- a/usr.sbin/pkg_install/create/perform.c +++ b/usr.sbin/pkg_install/create/perform.c @@ -1,5 +1,5 @@ #ifndef lint -static const char *rcsid = "$Id: perform.c,v 1.28 1995/10/25 15:38:01 jkh Exp $"; +static const char *rcsid = "$Id: perform.c,v 1.29 1996/02/06 22:49:11 jdp Exp $"; #endif /* @@ -223,6 +223,7 @@ make_dist(char *home, char *pkg, char *suffix, Package *plist) barf("Cannot fork process for tar: %s", strerror(errno)); if (pid == 0) { /* The child */ dup2(pipefds[0], 0); + close(pipefds[0]); close(pipefds[1]); execv("/usr/bin/tar", args); barf("Failed to execute tar command: %s", strerror(errno));