From 226a5653429e962b0100502936342149a9c7fae2 Mon Sep 17 00:00:00 2001 From: "graham.gower" Date: Tue, 17 Nov 2009 02:10:45 +0000 Subject: [PATCH] Call _exit() and not exit() from within the child process. git-svn-id: http://opkg.googlecode.com/svn/trunk@325 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358 --- libbb/gz_open.c | 2 +- libbb/unzip.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/libbb/gz_open.c b/libbb/gz_open.c index 330ba60..f9ee8c1 100644 --- a/libbb/gz_open.c +++ b/libbb/gz_open.c @@ -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")); diff --git a/libbb/unzip.c b/libbb/unzip.c index 058aa07..894b788 100644 --- a/libbb/unzip.c +++ b/libbb/unzip.c @@ -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; -- 2.25.1