aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn L McGrath <bug1@ihug.co.nz>2001-04-07 02:40:59 +0000
committerGlenn L McGrath <bug1@ihug.co.nz>2001-04-07 02:40:59 +0000
commitf608da428835cb7a6f921451d6f6bdc196fb5603 (patch)
treefc231f5361d5987bbb045ffe3652a4745886541c
parente5f39576650933770153e82c63a46f27fcd72b0e (diff)
downloadbusybox-w32-f608da428835cb7a6f921451d6f6bdc196fb5603.tar.gz
busybox-w32-f608da428835cb7a6f921451d6f6bdc196fb5603.tar.bz2
busybox-w32-f608da428835cb7a6f921451d6f6bdc196fb5603.zip
Ignore SIGTERM prior to gz_close()
-rw-r--r--archival/dpkg_deb.c6
-rw-r--r--dpkg_deb.c6
2 files changed, 10 insertions, 2 deletions
diff --git a/archival/dpkg_deb.c b/archival/dpkg_deb.c
index 309f8d762..8239c3c43 100644
--- a/archival/dpkg_deb.c
+++ b/archival/dpkg_deb.c
@@ -24,6 +24,7 @@
24#include <unistd.h> 24#include <unistd.h>
25#include <string.h> 25#include <string.h>
26#include <stdlib.h> 26#include <stdlib.h>
27#include <signal.h>
27#include "busybox.h" 28#include "busybox.h"
28 29
29/* From gunzip.c */ 30/* From gunzip.c */
@@ -120,8 +121,11 @@ extern int deb_extract(int optflags, const char *dir_name, const char *deb_filen
120 } 121 }
121 status = readTarFile(srcFd, extract_flag, list_flag, 122 status = readTarFile(srcFd, extract_flag, list_flag,
122 extract_to_stdout, verbose_flag, NULL, extract_list); 123 extract_to_stdout, verbose_flag, NULL, extract_list);
123 close(srcFd); 124
125 /* we are deliberately terminating the child so we can safely ignore this */
126 signal(SIGTERM, SIG_IGN);
124 gz_close(pid); 127 gz_close(pid);
128 close(srcFd);
125 fclose(comp_file); 129 fclose(comp_file);
126 130
127 return status; 131 return status;
diff --git a/dpkg_deb.c b/dpkg_deb.c
index 309f8d762..8239c3c43 100644
--- a/dpkg_deb.c
+++ b/dpkg_deb.c
@@ -24,6 +24,7 @@
24#include <unistd.h> 24#include <unistd.h>
25#include <string.h> 25#include <string.h>
26#include <stdlib.h> 26#include <stdlib.h>
27#include <signal.h>
27#include "busybox.h" 28#include "busybox.h"
28 29
29/* From gunzip.c */ 30/* From gunzip.c */
@@ -120,8 +121,11 @@ extern int deb_extract(int optflags, const char *dir_name, const char *deb_filen
120 } 121 }
121 status = readTarFile(srcFd, extract_flag, list_flag, 122 status = readTarFile(srcFd, extract_flag, list_flag,
122 extract_to_stdout, verbose_flag, NULL, extract_list); 123 extract_to_stdout, verbose_flag, NULL, extract_list);
123 close(srcFd); 124
125 /* we are deliberately terminating the child so we can safely ignore this */
126 signal(SIGTERM, SIG_IGN);
124 gz_close(pid); 127 gz_close(pid);
128 close(srcFd);
125 fclose(comp_file); 129 fclose(comp_file);
126 130
127 return status; 131 return status;