tree-wide: use new RET_NERRNO() helper at various places
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
ef470ffa23
commit
7c248223eb
@@ -575,14 +575,8 @@ int machine_kill(Machine *m, KillWho who, int signo) {
|
||||
if (!m->unit)
|
||||
return -ESRCH;
|
||||
|
||||
if (who == KILL_LEADER) {
|
||||
/* If we shall simply kill the leader, do so directly */
|
||||
|
||||
if (kill(m->leader, signo) < 0)
|
||||
return -errno;
|
||||
|
||||
return 0;
|
||||
}
|
||||
if (who == KILL_LEADER) /* If we shall simply kill the leader, do so directly */
|
||||
return RET_NERRNO(kill(m->leader, signo));
|
||||
|
||||
/* Otherwise, make PID 1 do it for us, for the entire cgroup */
|
||||
return manager_kill_unit(m->manager, m->unit, signo, NULL);
|
||||
|
||||
Reference in New Issue
Block a user