Re: 2.6.18 -mm merge plans

Eric W. Biederman
2006-06-10T08:10:10Z

"Serge E. Hallyn" <serue@us.ibm.com> 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