diff options
author | Glenn L McGrath | 2001-04-07 02:40:59 +0000 |
---|---|---|
committer | Glenn L McGrath | 2001-04-07 02:40:59 +0000 |
commit | f608da428835cb7a6f921451d6f6bdc196fb5603 (patch) | |
tree | fc231f5361d5987bbb045ffe3652a4745886541c /archival/dpkg_deb.c | |
parent | e5f39576650933770153e82c63a46f27fcd72b0e (diff) | |
download | busybox-f608da428835cb7a6f921451d6f6bdc196fb5603.zip busybox-f608da428835cb7a6f921451d6f6bdc196fb5603.tar.gz |
Ignore SIGTERM prior to gz_close()
Diffstat (limited to 'archival/dpkg_deb.c')
-rw-r--r-- | archival/dpkg_deb.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/archival/dpkg_deb.c b/archival/dpkg_deb.c index 309f8d7..8239c3c 100644 --- a/archival/dpkg_deb.c +++ b/archival/dpkg_deb.c @@ -24,6 +24,7 @@ #include <unistd.h> #include <string.h> #include <stdlib.h> +#include <signal.h> #include "busybox.h" /* From gunzip.c */ @@ -120,8 +121,11 @@ extern int deb_extract(int optflags, const char *dir_name, const char *deb_filen } status = readTarFile(srcFd, extract_flag, list_flag, extract_to_stdout, verbose_flag, NULL, extract_list); - close(srcFd); + + /* we are deliberately terminating the child so we can safely ignore this */ + signal(SIGTERM, SIG_IGN); gz_close(pid); + close(srcFd); fclose(comp_file); return status; |