mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-22 13:33:56 +03:00
unit: always return 1 in log_kill
This ensures that cg_kill_items returns the correct value to let the manager know that a process was killed. (cherry picked from commit500cd2e83b
) (cherry picked from commit86686e4292
)
This commit is contained in:
parent
25cb55890e
commit
64d7289214
@ -4482,7 +4482,9 @@ static int log_kill(pid_t pid, int sig, void *userdata) {
|
||||
/* Don't log about processes marked with brackets, under the assumption that these are temporary processes
|
||||
only, like for example systemd's own PAM stub process. */
|
||||
if (comm && comm[0] == '(')
|
||||
return 0;
|
||||
/* Although we didn't log anything, as this callback is used in unit_kill_context we must return 1
|
||||
* here to let the manager know that a process was killed. */
|
||||
return 1;
|
||||
|
||||
log_unit_notice(userdata,
|
||||
"Killing process " PID_FMT " (%s) with signal SIG%s.",
|
||||
|
Loading…
Reference in New Issue
Block a user