Re: 2.6.18 -mm merge plans

From: Eric W. Biederman
Date: Sat Jun 10 2006 - 04:09:43 EST


"Serge E. Hallyn" <serue@xxxxxxxxxx> writes:

> Oh, you mean instead of doing kill_proc(struct pid->nr), which
> I guess was pretty braindead? :)

For a single process we should be able to do:
struct pid *pid = ( some value ... )
struct task_struct *task;
rcu_read_lock();
task = pid_task(pid);
if (task)
group_send_sig_info(sig, info, task);
rcu_read_unlock();

If it comes up very often that looks like an idiom
that would appreciate a helper function.

For process groups we must get a read_lock on the task_list_lock
because otherwise the atomicity guarantees of sending a signal
to a process group are broken.

Eric
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/