use _exit instead of exit in forks
authorewt <devnull@localhost>
Thu, 12 Dec 1996 03:35:01 +0000 (03:35 +0000)
committerewt <devnull@localhost>
Thu, 12 Dec 1996 03:35:01 +0000 (03:35 +0000)
CVS patchset: 1233
CVS date: 1996/12/12 03:35:01

build/build.c
build/pack.c
build/reqprov.c
lib/rpmlead.c
lib/signature.c
lib/uninstall.c

index f63ac3f..ac03193 100644 (file)
@@ -128,7 +128,7 @@ int execScript(struct Script *script)
     if (!(pid = fork())) {
        execl(script->name, script->name, NULL);
        rpmError(RPMERR_SCRIPT, "Exec failed");
-       exit(RPMERR_SCRIPT);
+       _exit(RPMERR_SCRIPT);
     }
     wait(&status);
     if (! WIFEXITED(status) || WEXITSTATUS(status)) {
index 7ce1376..284f5ac 100644 (file)
@@ -223,7 +223,7 @@ static int cpio_gzip(int fd, char *tempdir, char *writePtr,
        if (prefix) {
            if (chdir(prefix)) {
                rpmError(RPMERR_EXEC, "Couldn't chdir to %s", prefix);
-               exit(RPMERR_EXEC);
+               _exit(RPMERR_EXEC);
            }
        }
 
@@ -232,7 +232,7 @@ static int cpio_gzip(int fd, char *tempdir, char *writePtr,
               (tempdir) ? "-LH" : "-H",
               "crc", NULL);
        rpmError(RPMERR_EXEC, "Couldn't exec cpio");
-       exit(RPMERR_EXEC);
+       _exit(RPMERR_EXEC);
     }
     if (cpioPID < 0) {
        rpmError(RPMERR_FORK, "Couldn't fork cpio");
@@ -256,7 +256,7 @@ static int cpio_gzip(int fd, char *tempdir, char *writePtr,
 
        execlp("gzip", "gzip", "-c9fn", NULL);
        rpmError(RPMERR_EXEC, "Couldn't exec gzip");
-       exit(RPMERR_EXEC);
+       _exit(RPMERR_EXEC);
     }
     if (gzipPID < 0) {
        rpmError(RPMERR_FORK, "Couldn't fork gzip");
index 41860e1..6aee244 100644 (file)
@@ -123,7 +123,7 @@ static StringBuf getOutputFrom(char *dir, char *argv[],
        
        execvp(argv[0], argv);
        rpmError(RPMERR_EXEC, "Couldn't exec %s", argv[0]);
-       exit(RPMERR_EXEC);
+       _exit(RPMERR_EXEC);
     }
     if (progPID < 0) {
        rpmError(RPMERR_FORK, "Couldn't fork %s", argv[0]);
index 4e4bcc8..45b8ccf 100644 (file)
@@ -8,6 +8,7 @@
 #include <unistd.h>
 #include <string.h>
 #include <errno.h>
+#include <sys/types.h>
 
 #include "rpmlib.h"
 #include "rpmlead.h"
index e7d94e2..12c175c 100644 (file)
@@ -213,7 +213,7 @@ static int makePGPSignature(char *file, void **sig, int_32 *size,
               name, "-sb", file, sigfile,
               NULL);
        rpmError(RPMERR_EXEC, "Couldn't exec pgp");
-       exit(RPMERR_EXEC);
+       _exit(RPMERR_EXEC);
     }
 
     fpipe = fdopen(inpipe[1], "w");
@@ -385,7 +385,7 @@ static int verifyPGPSignature(char *datafile, void *sig,
               NULL);
        printf("exec failed!\n");
        rpmError(RPMERR_EXEC, "Could not run pgp.  Use --nopgp to skip PGP checks.");
-       exit(RPMERR_EXEC);
+       _exit(RPMERR_EXEC);
     }
 
     close(outpipe[1]);
@@ -468,7 +468,7 @@ static int checkPassPhrase(char *passPhrase)
               name, "-sf",
               NULL);
        rpmError(RPMERR_EXEC, "Couldn't exec pgp");
-       exit(RPMERR_EXEC);
+       _exit(RPMERR_EXEC);
     }
 
     fpipe = fdopen(passPhrasePipe[1], "w");
index 104411e..1b04d10 100644 (file)
@@ -362,7 +362,7 @@ int runScript(char * prefix, Header h, int tag, int arg, int norunScripts) {
                execl("/bin/sh", "/bin/sh", "-x", "-s", upgradeArg, NULL);
            else
                execl("/bin/sh", "/bin/sh", "-s", upgradeArg, NULL);
-           exit(-1);
+           _exit(-1);
        }
        close(fd);
        waitpid(child, &status, 0);