Re: [patch] new sys_tkill2() system call, 2.5.70

Ingo Molnar (mingo@elte.hu)
Tue, 3 Jun 2003 18:15:00 +0200 (CEST)


On Tue, 3 Jun 2003, Linus Torvalds wrote:

> How about calling it "tgkill()" for "thread" and "group", which are the
> new inputs?

ok, agreed.

> It would also seem a lot cleaner that the "any" value be "-1" (like it
> is for the other kill functions), and it works for both tgid _and_ for
> pid, so that
>
> tgkill(-1, pid, sig) == tkill(pid, sig) == kill thread
> tgkill(pid, -1, sig) == kill(pid, sig) == kill group

well, the current sys_tkill implementation does not recognize '-1' at all:

/* This is only valid for single tasks */
if (pid <= 0)
return -EINVAL;

it's a simple path to send signals to a single thread and nothing more.

are you suggesting to extend sys_tgkill() functionality to also detect -1
for the PID, and do a process-signal send? I dont think that's necessary,
because it overlaps the already existing sys_kill() functionality - and
probably it would just end up being an internal call to
kill_something_info() anyway.

if the goal is completeness then < -1 negative pid values should probably
be recognized as 'process group' values as well?

then sys_tgkill would basically be a super-kill(), encompassing all the
kill() semantics we have currently, extended with the group-specific send
functionality.

Ingo

-
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/