aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_install
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2001-06-11 14:18:26 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2001-06-11 14:18:26 +0000
commit2b67592fad150325d24e77a44b42aa4761a1187d (patch)
tree5f73402b46af10b9489dc0ab42987526808ca2d7 /usr.sbin/pkg_install
parent9e2a792c46c6dee96e1ac26377261604e14d13b0 (diff)
Notes
Diffstat (limited to 'usr.sbin/pkg_install')
-rw-r--r--usr.sbin/pkg_install/lib/file.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/pkg_install/lib/file.c b/usr.sbin/pkg_install/lib/file.c
index baf65b18f247..42602ec81ebf 100644
--- a/usr.sbin/pkg_install/lib/file.c
+++ b/usr.sbin/pkg_install/lib/file.c
@@ -151,6 +151,7 @@ fileGetURL(char *base, char *spec)
int pfd[2], pstat;
size_t r, w;
char *hint;
+ int fd;
rp = NULL;
/* Special tip that sysinstall left for us */
@@ -196,7 +197,7 @@ fileGetURL(char *base, char *spec)
else
strcpy(fname, spec);
- if ((ftp = fetchGetURL(fname, NULL)) == NULL) {
+ if ((ftp = fetchGetURL(fname, Verbose ? "v" : NULL)) == NULL) {
printf("Error: FTP Unable to get %s: %s\n",
fname, fetchLastErrString);
return NULL;
@@ -221,9 +222,9 @@ fileGetURL(char *base, char *spec)
exit(2);
}
if (!tpid) {
- close(pfd[1]);
dup2(pfd[0], 0);
- close(pfd[0]);
+ for (fd = 3; fd < OPEN_MAX; ++fd)
+ close(fd);
execl("/usr/bin/tar", "tar", Verbose ? "-xzvf" : "-xzf", "-", 0);
_exit(2);
}