Merge pull request #14218 from poettering/homed-preparatory-small-stuff

Assorted smaller stuff split out from homed PR
This commit is contained in:
Lennart Poettering
2019-12-04 13:13:38 +01:00
committed by GitHub
13 changed files with 149 additions and 56 deletions
+7
View File
@@ -1338,6 +1338,13 @@ int safe_fork_full(
log_full_errno(prio, r, "Failed to connect stdin/stdout to /dev/null: %m");
_exit(EXIT_FAILURE);
}
} else if (flags & FORK_STDOUT_TO_STDERR) {
if (dup2(STDERR_FILENO, STDOUT_FILENO) < 0) {
log_full_errno(prio, r, "Failed to connect stdout to stderr: %m");
_exit(EXIT_FAILURE);
}
}
if (flags & FORK_RLIMIT_NOFILE_SAFE) {