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:00:51 -0800 [thread overview]
Message-ID: <20040313210051.6b4a2846.akpm@osdl.org> (raw)
In-Reply-To: <1079239159.8186.24.camel@berloga.shadowland>
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;
}
next prev parent reply other threads:[~2004-03-14 5:00 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 [this message]
2004-03-14 5:21 ` Alex Lyashkov
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=20040313210051.6b4a2846.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 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®