summaryrefslogtreecommitdiff
path: root/src/import
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-05-31 23:55:55 +0200
committerLennart Poettering <lennart@poettering.net>2015-06-10 01:28:58 +0200
commitce30c8dcb41dfe9264f79f30c7f51c0e74576638 (patch)
tree2d5c05e1225b43ec3d9870316899c1e87f7f381d /src/import
parent0c2c2a3aeb4c348e41d5d634c397faa3aa35cba7 (diff)
tree-wide: whenever we fork off a foreign child process reset signal mask/handlers
Also, when the child is potentially long-running make sure to set a death signal. Also, ignore the result of the reset operations explicitly by casting them to (void).
Diffstat (limited to 'src/import')
-rw-r--r--src/import/export.c2
-rw-r--r--src/import/import-common.c8
-rw-r--r--src/import/import.c2
-rw-r--r--src/import/importd.c4
-rw-r--r--src/import/pull-common.c4
-rw-r--r--src/import/pull.c2
6 files changed, 11 insertions, 11 deletions
diff --git a/src/import/export.c b/src/import/export.c
index d4bc88e010..e563bee96e 100644
--- a/src/import/export.c
+++ b/src/import/export.c
@@ -311,7 +311,7 @@ int main(int argc, char *argv[]) {
if (r <= 0)
goto finish;
- ignore_signals(SIGPIPE, -1);
+ (void) ignore_signals(SIGPIPE, -1);
r = export_main(argc, argv);
diff --git a/src/import/import-common.c b/src/import/import-common.c
index 9711614000..950c7b4acd 100644
--- a/src/import/import-common.c
+++ b/src/import/import-common.c
@@ -97,8 +97,8 @@ int import_fork_tar_x(const char *path, pid_t *ret) {
/* Child */
- reset_all_signal_handlers();
- reset_signal_mask();
+ (void) reset_all_signal_handlers();
+ (void) reset_signal_mask();
assert_se(prctl(PR_SET_PDEATHSIG, SIGTERM) == 0);
pipefd[1] = safe_close(pipefd[1]);
@@ -171,8 +171,8 @@ int import_fork_tar_c(const char *path, pid_t *ret) {
/* Child */
- reset_all_signal_handlers();
- reset_signal_mask();
+ (void) reset_all_signal_handlers();
+ (void) reset_signal_mask();
assert_se(prctl(PR_SET_PDEATHSIG, SIGTERM) == 0);
pipefd[0] = safe_close(pipefd[0]);
diff --git a/src/import/import.c b/src/import/import.c
index fff5a104b1..3091ed1c45 100644
--- a/src/import/import.c
+++ b/src/import/import.c
@@ -328,7 +328,7 @@ int main(int argc, char *argv[]) {
if (r <= 0)
goto finish;
- ignore_signals(SIGPIPE, -1);
+ (void) ignore_signals(SIGPIPE, -1);
r = import_main(argc, argv);
diff --git a/src/import/importd.c b/src/import/importd.c
index 50566a6e5c..e2df44ad26 100644
--- a/src/import/importd.c
+++ b/src/import/importd.c
@@ -390,8 +390,8 @@ static int transfer_start(Transfer *t) {
/* Child */
- reset_all_signal_handlers();
- reset_signal_mask();
+ (void) reset_all_signal_handlers();
+ (void) reset_signal_mask();
assert_se(prctl(PR_SET_PDEATHSIG, SIGTERM) == 0);
pipefd[0] = safe_close(pipefd[0]);
diff --git a/src/import/pull-common.c b/src/import/pull-common.c
index d2588d4fa0..652277e4be 100644
--- a/src/import/pull-common.c
+++ b/src/import/pull-common.c
@@ -339,8 +339,8 @@ int pull_verify(
/* Child */
- reset_all_signal_handlers();
- reset_signal_mask();
+ (void) reset_all_signal_handlers();
+ (void) reset_signal_mask();
assert_se(prctl(PR_SET_PDEATHSIG, SIGTERM) == 0);
gpg_pipe[1] = safe_close(gpg_pipe[1]);
diff --git a/src/import/pull.c b/src/import/pull.c
index eec4583868..03fe3dcaf4 100644
--- a/src/import/pull.c
+++ b/src/import/pull.c
@@ -440,7 +440,7 @@ int main(int argc, char *argv[]) {
if (r <= 0)
goto finish;
- ignore_signals(SIGPIPE, -1);
+ (void) ignore_signals(SIGPIPE, -1);
r = pull_main(argc, argv);