mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alex Lyashkov <shadow@psoft.net>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: possible kernel bug in signal transit.
Date: Sun, 14 Mar 2004 07:21:08 +0200	[thread overview]
Message-ID: <1079241668.8186.33.camel@berloga.shadowland> (raw)
In-Reply-To: <20040313210051.6b4a2846.akpm@osdl.org>

В Вск, 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

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

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-13 17:02 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 [this message]
2004-03-14  5:47         ` Andrew Morton
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=1079241668.8186.33.camel@berloga.shadowland \
    --to=shadow@psoft.net \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®