summaryrefslogtreecommitdiff
path: root/src/import/import-common.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2017-12-27 21:49:19 +0100
committerLennart Poettering <lennart@poettering.net>2018-01-04 13:27:26 +0100
commitb6e1fff13dbfc1623de41b78bc525f410fb59b91 (patch)
treeb920f51ea393852d2776aecaa0701293df8903a6 /src/import/import-common.c
parent799a960d1f80c58fd982b3c248906cd4791a69fa (diff)
downloadsystemd-b6e1fff13dbfc1623de41b78bc525f410fb59b91.tar.gz
process-util: add another fork_safe() flag for enabling LOG_ERR/LOG_WARN logging
Diffstat (limited to 'src/import/import-common.c')
-rw-r--r--src/import/import-common.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/import/import-common.c b/src/import/import-common.c
index 1efbda9787..aa7ab974d2 100644
--- a/src/import/import-common.c
+++ b/src/import/import-common.c
@@ -82,9 +82,9 @@ int import_fork_tar_x(const char *path, pid_t *ret) {
if (pipe2(pipefd, O_CLOEXEC) < 0)
return log_error_errno(errno, "Failed to create pipe for tar: %m");
- r = safe_fork("(tar)", FORK_RESET_SIGNALS|FORK_DEATHSIG, &pid);
+ r = safe_fork("(tar)", FORK_RESET_SIGNALS|FORK_DEATHSIG|FORK_LOG, &pid);
if (r < 0)
- return log_error_errno(r, "Failed to fork off tar: %m");
+ return r;
if (r == 0) {
int null_fd;
uint64_t retain =
@@ -151,9 +151,9 @@ int import_fork_tar_c(const char *path, pid_t *ret) {
if (pipe2(pipefd, O_CLOEXEC) < 0)
return log_error_errno(errno, "Failed to create pipe for tar: %m");
- r = safe_fork("(tar)", FORK_RESET_SIGNALS|FORK_DEATHSIG, &pid);
+ r = safe_fork("(tar)", FORK_RESET_SIGNALS|FORK_DEATHSIG|FORK_LOG, &pid);
if (r < 0)
- return log_error_errno(r, "Failed to fork off tar: %m");
+ return r;
if (r == 0) {
int null_fd;
uint64_t retain = (1ULL << CAP_DAC_OVERRIDE);