process-util: add another fork_safe() flag for enabling LOG_ERR/LOG_WARN logging

This commit is contained in:
Lennart Poettering
2018-01-04 13:27:26 +01:00
parent 799a960d1f
commit b6e1fff13d
23 changed files with 70 additions and 80 deletions
+2 -2
View File
@@ -43,9 +43,9 @@ static int spawn_getent(const char *database, const char *key, pid_t *rpid) {
if (pipe2(pipe_fds, O_CLOEXEC) < 0)
return log_error_errno(errno, "Failed to allocate pipe: %m");
r = safe_fork("(getent)", FORK_RESET_SIGNALS|FORK_DEATHSIG, &pid);
r = safe_fork("(getent)", FORK_RESET_SIGNALS|FORK_DEATHSIG|FORK_LOG, &pid);
if (r < 0)
return log_error_errno(r, "Failed to fork getent child: %m");
return r;
if (r == 0) {
int nullfd;
char *empty_env = NULL;