[systemd-commits] src/execute.c src/service.c
Lennart Poettering
lennart at kemper.freedesktop.org
Tue May 18 19:28:33 PDT 2010
src/execute.c | 4 ++++
src/service.c | 5 +++++
2 files changed, 9 insertions(+)
New commits:
commit 15ca554ba3a40e6840c6d6095ec90cf448720454
Author: Lennart Poettering <lennart at poettering.net>
Date: Wed May 19 04:28:25 2010 +0200
service: by default send service output to syslog, except for SysV services which should go to the console
diff --git a/src/execute.c b/src/execute.c
index 1076834..37b2f84 100644
--- a/src/execute.c
+++ b/src/execute.c
@@ -1087,6 +1087,10 @@ void exec_context_init(ExecContext *c) {
c->cpu_sched_policy = SCHED_OTHER;
c->syslog_priority = LOG_DAEMON|LOG_INFO;
c->mount_flags = MS_SHARED;
+
+ c->std_input = EXEC_INPUT_NULL;
+ c->std_output = EXEC_OUTPUT_SYSLOG;
+ c->std_error = EXEC_OUTPUT_SYSLOG;
}
void exec_context_done(ExecContext *c) {
diff --git a/src/service.c b/src/service.c
index 2515cd3..0615b51 100644
--- a/src/service.c
+++ b/src/service.c
@@ -632,6 +632,11 @@ static int service_load_sysv_path(Service *s, const char *path) {
s->valid_no_process = true;
s->kill_mode = KILL_PROCESS_GROUP;
+ /* For SysV services log output should go to the console */
+ s->exec_context.std_input = EXEC_INPUT_NULL;
+ s->exec_context.std_output = EXEC_OUTPUT_TTY;
+ s->exec_context.std_error = EXEC_OUTPUT_TTY;
+
u->meta.load_state = UNIT_LOADED;
r = 0;
More information about the systemd-commits
mailing list