diff options
Diffstat (limited to 'gunzip.c')
-rw-r--r-- | gunzip.c | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -125,14 +125,13 @@ unsigned short mask_bits[] = { | |||
125 | //static int error_number = 0; | 125 | //static int error_number = 0; |
126 | /* ======================================================================== | 126 | /* ======================================================================== |
127 | * Signal and error handler. | 127 | * Signal and error handler. |
128 | */ | ||
128 | 129 | ||
129 | static void abort_gzip() | 130 | static void abort_gzip() |
130 | { | 131 | { |
131 | error_msg("gzip aborted\n"); | 132 | error_msg("gzip aborted\n"); |
132 | // exit(ERROR); | 133 | exit(ERROR); |
133 | return; | ||
134 | } | 134 | } |
135 | */ | ||
136 | 135 | ||
137 | static void make_crc_table() | 136 | static void make_crc_table() |
138 | { | 137 | { |
@@ -918,7 +917,7 @@ extern int unzip(FILE *l_in_file, FILE *l_out_file) | |||
918 | in_file = l_in_file; | 917 | in_file = l_in_file; |
919 | out_file = l_out_file; | 918 | out_file = l_out_file; |
920 | 919 | ||
921 | /* if (signal(SIGINT, SIG_IGN) != SIG_IGN) { | 920 | if (signal(SIGINT, SIG_IGN) != SIG_IGN) { |
922 | (void) signal(SIGINT, (sig_type) abort_gzip); | 921 | (void) signal(SIGINT, (sig_type) abort_gzip); |
923 | } | 922 | } |
924 | #ifdef SIGTERM | 923 | #ifdef SIGTERM |
@@ -931,7 +930,7 @@ extern int unzip(FILE *l_in_file, FILE *l_out_file) | |||
931 | (void) signal(SIGHUP, (sig_type) abort_gzip); | 930 | (void) signal(SIGHUP, (sig_type) abort_gzip); |
932 | } | 931 | } |
933 | #endif | 932 | #endif |
934 | */ | 933 | |
935 | /* Allocate all global buffers (for DYN_ALLOC option) */ | 934 | /* Allocate all global buffers (for DYN_ALLOC option) */ |
936 | window = xmalloc((size_t)(((2L*WSIZE)+1L)*sizeof(unsigned char))); | 935 | window = xmalloc((size_t)(((2L*WSIZE)+1L)*sizeof(unsigned char))); |
937 | outcnt = 0; | 936 | outcnt = 0; |
@@ -1022,7 +1021,6 @@ extern int gz_open(FILE *compressed_file, int *pid) | |||
1022 | { | 1021 | { |
1023 | int unzip_pipe[2]; | 1022 | int unzip_pipe[2]; |
1024 | 1023 | ||
1025 | // signal(SIGCHLD, abort_gzip); | ||
1026 | if (pipe(unzip_pipe)!=0) { | 1024 | if (pipe(unzip_pipe)!=0) { |
1027 | error_msg("pipe error"); | 1025 | error_msg("pipe error"); |
1028 | return(EXIT_FAILURE); | 1026 | return(EXIT_FAILURE); |