chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
systemctl: fix parsing of cgroup contents
[elogind.git]
/
src
/
service.c
diff --git
a/src/service.c
b/src/service.c
index 04ed6843935e6b719cc74c06b49463646574435a..ae8a763e7c1647c495e9d2dcd8202949b75ed41f 100644
(file)
--- a/
src/service.c
+++ b/
src/service.c
@@
-144,6
+144,8
@@
static int service_set_main_pid(Service *s, pid_t pid) {
s->main_pid = pid;
s->main_pid_known = true;
s->main_pid = pid;
s->main_pid_known = true;
+ exec_status_start(&s->main_exec_status, pid);
+
return 0;
}
return 0;
}
@@
-2082,7
+2084,7
@@
static void service_sigchld_event(Unit *u, pid_t pid, int code, int status) {
if (s->main_pid == pid) {
if (s->main_pid == pid) {
- exec_status_
fill
(&s->main_exec_status, pid, code, status);
+ exec_status_
exit
(&s->main_exec_status, pid, code, status);
s->main_pid = 0;
if (s->type != SERVICE_FORKING) {
s->main_pid = 0;
if (s->type != SERVICE_FORKING) {
@@
-2138,7
+2140,7
@@
static void service_sigchld_event(Unit *u, pid_t pid, int code, int status) {
} else if (s->control_pid == pid) {
if (s->control_command)
} else if (s->control_pid == pid) {
if (s->control_command)
- exec_status_
fill
(&s->control_command->exec_status, pid, code, status);
+ exec_status_
exit
(&s->control_command->exec_status, pid, code, status);
s->control_pid = 0;
s->control_pid = 0;