summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorjdp <jdp@FreeBSD.org>1996-03-20 19:05:59 +0000
committerjdp <jdp@FreeBSD.org>1996-03-20 19:05:59 +0000
commit0f90888e3b95f8c6f31b4f06158103a65e1ae15f (patch)
tree10670c73939df3271750f74fce2fe4a4b66661b0 /usr.sbin
parent78136570e7e473b76eb91767a92783e8c9f27fa5 (diff)
downloadFreeBSD-src-0f90888e3b95f8c6f31b4f06158103a65e1ae15f.zip
FreeBSD-src-0f90888e3b95f8c6f31b4f06158103a65e1ae15f.tar.gz
Close a file descriptor that I had (harmlessly) left open in a child
process.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/pkg_install/create/perform.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/pkg_install/create/perform.c b/usr.sbin/pkg_install/create/perform.c
index 178b3a4..c37459f 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));
OpenPOWER on IntegriCloud