All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Alex Lyashkov <shadow@psoft.net>
Cc: linux-kernel@vger.kernel.org
Subject: Re: possible kernel bug in signal transit.
Date: Sat, 13 Mar 2004 21:47:00 -0800	[thread overview]
Message-ID: <20040313214700.387c4ff3.akpm@osdl.org> (raw)
In-Reply-To: <1079241668.8186.33.camel@berloga.shadowland>

Alex Lyashkov <shadow@psoft.net> wrote:
>
> > 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.

Well we can only return one error code.  Or are you suggesting that we
should terminate the loop early on error?  If so, why?

  reply	other threads:[~2004-03-14  5:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-13 17:02 possible kernel bug in signal transit Alex Lyashkov
2004-03-14  1:18 ` Andrew Morton
2004-03-14  4:39   ` Alex Lyashkov
2004-03-14  5:00     ` Andrew Morton
2004-03-14  5:21       ` Alex Lyashkov
2004-03-14  5:47         ` Andrew Morton [this message]
2004-03-14  5:56           ` Alex Lyashkov
2004-03-14  6:09             ` Andrew Morton
2004-03-14  6:26               ` Alex Lyashkov
2004-03-14  6:37                 ` Andrew Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040313214700.387c4ff3.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shadow@psoft.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.