[systemd-commits] 2 commits - src/execute.c units/systemd-logger.service.in
Lennart Poettering
lennart at kemper.freedesktop.org
Wed May 19 16:35:05 PDT 2010
src/execute.c | 6 +++---
units/systemd-logger.service.in | 1 +
2 files changed, 4 insertions(+), 3 deletions(-)
New commits:
commit 9949ac0cec2aa0de4159260b2817e136825dbc3c
Author: Lennart Poettering <lennart at poettering.net>
Date: Thu May 20 01:34:59 2010 +0200
logger: we need to be started after syslog
diff --git a/units/systemd-logger.service.in b/units/systemd-logger.service.in
index 53ea586..39a2001 100644
--- a/units/systemd-logger.service.in
+++ b/units/systemd-logger.service.in
@@ -9,6 +9,7 @@
[Unit]
Description=systemd Logging Daemon
+After=@SPECIAL_SYSLOG_SERVICE@
[Service]
ExecStart=@pkglibexecdir@/systemd-logger
commit dec5d55298280120ad561e2e1f123d57c2c4af1c
Author: Lennart Poettering <lennart at poettering.net>
Date: Thu May 20 01:34:42 2010 +0200
execute: check ppid, not pid for 1
diff --git a/src/execute.c b/src/execute.c
index 53f6d9a..06eb152 100644
--- a/src/execute.c
+++ b/src/execute.c
@@ -305,8 +305,8 @@ static int setup_output(const ExecContext *context, int socket_fd, const char *i
return dup2(STDIN_FILENO, STDOUT_FILENO) < 0 ? -errno : STDOUT_FILENO;
/* For PID 1 stdout is always connected to /dev/null,
- * hence reopen the console if necessary. */
- if (getpid() == 1)
+ * hence reopen the console if out parent is PID1. */
+ if (getppid() == 1)
return open_terminal_as(tty_path(context), O_WRONLY, STDOUT_FILENO);
return STDOUT_FILENO;
@@ -352,7 +352,7 @@ static int setup_error(const ExecContext *context, int socket_fd, const char *id
if (e == EXEC_OUTPUT_INHERIT &&
o == EXEC_OUTPUT_INHERIT &&
i != EXEC_INPUT_NULL &&
- getpid () != 1)
+ getppid () != 1)
return STDERR_FILENO;
/* Duplicate form stdout if possible */
More information about the systemd-commits
mailing list