Close a file descriptor that I had (harmlessly) left open in a child

process.
This commit is contained in:
John Polstra 1996-03-20 19:05:59 +00:00
parent 261a532a8b
commit 2e9061daf8

View File

@ -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));