Call _exit() and not exit() from within the child process.
[oweals/opkg-lede.git] / libbb / unzip.c
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;