From f608da428835cb7a6f921451d6f6bdc196fb5603 Mon Sep 17 00:00:00 2001 From: Glenn L McGrath Date: Sat, 7 Apr 2001 02:40:59 +0000 Subject: Ignore SIGTERM prior to gz_close() --- archival/dpkg_deb.c | 6 +++++- dpkg_deb.c | 6 +++++- 2 files changed, 10 insertions(+), 2 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 #include #include +#include #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; diff --git a/dpkg_deb.c b/dpkg_deb.c index 309f8d7..8239c3c 100644 --- a/dpkg_deb.c +++ b/dpkg_deb.c @@ -24,6 +24,7 @@ #include #include #include +#include #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; -- cgit v1.1