mirror of
https://github.com/sheumann/hush.git
synced 2024-12-25 18:33:06 +00:00
Ignore SIGTERM prior to gz_close()
This commit is contained in:
parent
e5f3957665
commit
f608da4288
@ -24,6 +24,7 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <signal.h>
|
||||||
#include "busybox.h"
|
#include "busybox.h"
|
||||||
|
|
||||||
/* From gunzip.c */
|
/* 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,
|
status = readTarFile(srcFd, extract_flag, list_flag,
|
||||||
extract_to_stdout, verbose_flag, NULL, extract_list);
|
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);
|
gz_close(pid);
|
||||||
|
close(srcFd);
|
||||||
fclose(comp_file);
|
fclose(comp_file);
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <signal.h>
|
||||||
#include "busybox.h"
|
#include "busybox.h"
|
||||||
|
|
||||||
/* From gunzip.c */
|
/* 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,
|
status = readTarFile(srcFd, extract_flag, list_flag,
|
||||||
extract_to_stdout, verbose_flag, NULL, extract_list);
|
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);
|
gz_close(pid);
|
||||||
|
close(srcFd);
|
||||||
fclose(comp_file);
|
fclose(comp_file);
|
||||||
|
|
||||||
return status;
|
return status;
|
||||||
|
Loading…
Reference in New Issue
Block a user