Messages in this thread | | | Subject | Re: possible kernel bug in signal transit. | From | Alex Lyashkov <> | Date | Sun, 14 Mar 2004 07:21:08 +0200 |
| |
В Вск, 14.03.2004, в 07:00, Andrew Morton пишет: > Alex Lyashkov <shadow@psoft.net> wrote: > > > > > Thanks for checking though.. > > No. it can`t return final non-zero-returning group_send_sig_info() if > > first call group_send_sig_info return 0. > > you're right. How about the nice and simple version? > > 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; > > if (pgrp <= 0) > return -EINVAL; > > found = 0; > retval = 0; > 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; > } > return found ? retval : -ESRCH; > } not. it error. At this code you save first non zero value err but other been ignored.
-- Alex Lyashkov <shadow@psoft.net> PSoft - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |