mirror of https://github.com/tmux/tmux.git
Always clean up the systemd unit, even if it fails
This can occur if the child process exits before the dbus call in the parent finishes, in which case the cgroup is unneeded.pull/3514/head
parent
76dd6ffee9
commit
9737c947bc
|
@ -166,6 +166,14 @@ systemd_move_pid_to_new_cgroup(pid_t pid, char **cause)
|
|||
goto finish;
|
||||
}
|
||||
|
||||
/* clean up the scope even if it fails */
|
||||
r = sd_bus_message_append(m, "(sv)", "CollectMode", "s", "inactive-or-failed");
|
||||
if (r < 0) {
|
||||
xasprintf(cause, "failed to append to properties: %s",
|
||||
strerror(-r));
|
||||
goto finish;
|
||||
}
|
||||
|
||||
/* end properties array */
|
||||
r = sd_bus_message_close_container(m);
|
||||
if (r < 0) {
|
||||
|
|
Loading…
Reference in New Issue