lkml.org 
[lkml]   [2006]   [Jun]   [10]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
From(Eric W. Biederman)
SubjectRe: 2.6.18 -mm merge plans
DateSat, 10 Jun 2006 02:09:53 -0600
"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
-
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/

\
 
 \ /
  Last update: 2006-06-10 10:12    [from the cache]
©2003-2008