chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
journald: store _SYSTEMD_UNIT= instead of _SYSTEMD_SERVICE= field, since processes...
[elogind.git]
/
src
/
service.c
diff --git
a/src/service.c
b/src/service.c
index 07137d265d3fab1b05c5ebac5b9601da8fc4c0f7..feecbbe2b6a93ad919e8bf32aec71f2069aefe25 100644
(file)
--- a/
src/service.c
+++ b/
src/service.c
@@
-841,7
+841,7
@@
static int service_load_sysv_path(Service *s, const char *path) {
s->restart = SERVICE_RESTART_NO;
if (s->meta.manager->sysv_console)
s->restart = SERVICE_RESTART_NO;
if (s->meta.manager->sysv_console)
- s->exec_context.std_output = EXEC_OUTPUT_
TTY
;
+ s->exec_context.std_output = EXEC_OUTPUT_
SYSLOG_AND_CONSOLE
;
s->exec_context.kill_mode = KILL_PROCESS;
s->exec_context.kill_mode = KILL_PROCESS;
@@
-2870,20
+2870,22
@@
static void service_sigchld_event(Unit *u, pid_t pid, int code, int status) {
break;
case SERVICE_START_POST:
break;
case SERVICE_START_POST:
- if (success) {
- if (s->pid_file) {
- int r = service_load_pid_file(s, true);
- if (r < 0) {
- r = service_demand_pid_file(s);
- if (r < 0 || !cgroup_good(s))
- service_enter_stop(s, false);
- break;
- }
- } else
- service_search_main_pid(s);
+ if (!success) {
+ service_enter_stop(s, false);
+ break;
}
}
- s->reload_failure = !success;
+ if (s->pid_file) {
+ int r = service_load_pid_file(s, true);
+ if (r < 0) {
+ r = service_demand_pid_file(s);
+ if (r < 0 || !cgroup_good(s))
+ service_enter_stop(s, false);
+ break;
+ }
+ } else
+ service_search_main_pid(s);
+
service_enter_running(s, true);
break;
service_enter_running(s, true);
break;