Commit 3a948de7 authored by Linus Torvalds's avatar Linus Torvalds

Fix kill_pg_info(): return success if _any_ signal succeeded.

parent 5adf0d58
......@@ -1071,23 +1071,19 @@ int __kill_pg_info(int sig, struct siginfo *info, pid_t pgrp)
struct task_struct *p;
struct list_head *l;
struct pid *pid;
int retval;
int found;
int retval, success;
if (pgrp <= 0)
return -EINVAL;
found = 0;
retval = 0;
success = 0;
retval = -ESRCH;
for_each_task_pid(pgrp, PIDTYPE_PGID, p, l, pid) {
int err;
found = 1;
err = group_send_sig_info(sig, info, p);
if (!retval)
retval = err;
int err = group_send_sig_info(sig, info, p);
success |= !err;
retval = err;
}
return found ? retval : -ESRCH;
return success ? 0 : retval;
}
int
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment