Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/pkg_install/lib Use absolute path to tar(1) in exec...



details:   https://anonhg.NetBSD.org/src/rev/9fdc07aaaa2e
branches:  trunk
changeset: 471806:9fdc07aaaa2e
user:      hubertf <hubertf%NetBSD.org@localhost>
date:      Mon Apr 12 00:29:51 1999 +0000

description:
Use absolute path to tar(1) in execl() call.
*** This makes retrieval of pkgs via ftp work again!

Also don't just call exit() if the execl() call fails, but print some
error (via err()).

diffstat:

 usr.sbin/pkg_install/lib/file.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (28 lines):

diff -r b9ea3c403c3a -r 9fdc07aaaa2e usr.sbin/pkg_install/lib/file.c
--- a/usr.sbin/pkg_install/lib/file.c   Mon Apr 12 00:25:13 1999 +0000
+++ b/usr.sbin/pkg_install/lib/file.c   Mon Apr 12 00:29:51 1999 +0000
@@ -1,11 +1,11 @@
-/*     $NetBSD: file.c,v 1.25 1999/03/15 08:57:12 christos Exp $       */
+/*     $NetBSD: file.c,v 1.26 1999/04/12 00:29:51 hubertf Exp $        */
 
 #include <sys/cdefs.h>
 #ifndef lint
 #if 0
 static const char *rcsid = "from FreeBSD Id: file.c,v 1.29 1997/10/08 07:47:54 charnier Exp";
 #else
-__RCSID("$NetBSD: file.c,v 1.25 1999/03/15 08:57:12 christos Exp $");
+__RCSID("$NetBSD: file.c,v 1.26 1999/04/12 00:29:51 hubertf Exp $");
 #endif
 #endif
 
@@ -311,8 +311,8 @@
            tpid = fork();
            if (!tpid) {
                dup2(fileno(ftp), 0);
-               i = execl(TAR_CMD, TAR_CMD, Verbose ? "-xzvf" : "-xzf", "-", 0);
-               exit(i);
+               i = execl(TAR_FULLPATHNAME, TAR_CMD, Verbose ? "-xzvf" : "-xzf", "-", 0);
+               err(i, TAR_FULLPATHNAME " failed");
            }
            else {
                int pstat;



Home | Main Index | Thread Index | Old Index