summaryrefslogtreecommitdiff
path: root/src/service.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2011-02-15 11:52:29 +0100
committerLennart Poettering <lennart@poettering.net>2011-02-15 11:52:29 +0100
commit0a494f1ff323ef36b7acc637c198fdfa240c2bb2 (patch)
treeb266f13b03e348b017d62592aa38fd08daecddb3 /src/service.c
parentb7cf1b68a79833411851fa547ac9b4906207c224 (diff)
exec: introduce global defaults for the standard output of services
Diffstat (limited to 'src/service.c')
-rw-r--r--src/service.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/service.c b/src/service.c
index 243e5536a7..e928d1a5e0 100644
--- a/src/service.c
+++ b/src/service.c
@@ -121,6 +121,8 @@ static void service_init(Unit *u) {
s->guess_main_pid = true;
exec_context_init(&s->exec_context);
+ s->exec_context.std_output = u->meta.manager->default_std_output;
+ s->exec_context.std_error = u->meta.manager->default_std_error;
RATELIMIT_INIT(s->ratelimit, 10*USEC_PER_SEC, 5);
@@ -817,7 +819,7 @@ static int service_load_sysv_path(Service *s, const char *path) {
s->restart = SERVICE_RESTART_NO;
s->exec_context.std_output =
(s->meta.manager->sysv_console || s->exec_context.std_input == EXEC_INPUT_TTY)
- ? EXEC_OUTPUT_TTY : EXEC_OUTPUT_NULL;
+ ? EXEC_OUTPUT_TTY : s->meta.manager->default_std_output;
s->exec_context.kill_mode = KILL_PROCESS_GROUP;
/* We use the long description only if