Call _exit() and not exit() from within the child process.
authorgraham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>
Tue, 17 Nov 2009 02:10:45 +0000 (02:10 +0000)
committergraham.gower <graham.gower@e8e0d7a0-c8d9-11dd-a880-a1081c7ac358>
Tue, 17 Nov 2009 02:10:45 +0000 (02:10 +0000)
git-svn-id: http://opkg.googlecode.com/svn/trunk@325 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358

libbb/gz_open.c
libbb/unzip.c

index 330ba60013e3f3ad2a3a677c8b6d7f2fa59ea578..f9ee8c10b53cdde04f2475316b17ae7872afe972 100644 (file)
@@ -48,7 +48,7 @@ extern FILE *gz_open(FILE *compressed_file, int *pid)
                fflush(NULL);
                fclose(compressed_file);
                close(unzip_pipe[1]);
-               exit(EXIT_SUCCESS);
+               _exit(EXIT_SUCCESS);
        }
        close(unzip_pipe[1]);
        return(fdopen(unzip_pipe[0], "r"));
index 058aa07535539719180b3c3b28b1394f4116a25f..894b7885fa983433d86c483f9265c2170b745da1 100644 (file)
@@ -98,7 +98,7 @@ static const unsigned short mask_bits[] = {
 static void abort_gzip()
 {
        error_msg("gzip aborted\n");
-       exit(ERROR);
+       _exit(ERROR);
 }
 
 static void make_crc_table()
@@ -148,7 +148,8 @@ static void flush_window(void)
        }
 
        if (fwrite(window, 1, outcnt, out_file) != outcnt) {
-               error_msg_and_die("Couldnt write");
+               error_msg("Couldnt write");
+               _exit(EXIT_FAILURE);
        }
        bytes_out += (unsigned long) outcnt;
        outcnt = 0;