lkml.org 
[lkml]   [2010]   [Dec]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 11/16] signal: prepare for CLD_* notification changes
On 12/06, Tejun Heo wrote:
>
> static void do_notify_parent_cldstop(struct task_struct *tsk, int why)
> {
> struct siginfo info;
> unsigned long flags;
> struct task_struct *parent;
> struct sighand_struct *sighand;
> + struct signal_struct *sig;
> + int notify = 0;
> +
> + /*
> + * Determine whether and what to notify. This should be done under
> + * @tsk's siglock.

Hmm... it is not clear why.

> + spin_lock_irqsave(&sighand->siglock, flags);
>
> + switch (why) {
> + case CLD_CONTINUED:
> + case CLD_STOPPED:
> + case CLD_TRAPPED:
> + notify = why;
> + break;
> + }

OK, with the next patches this code checks sig->flags, probably that
is why we take ->siglock. Still I can't understand this so far.
May be the comment could tell more?

> @@ -1640,6 +1684,7 @@ static void do_notify_parent_cldstop(struct task_struct *tsk, int why)
> }
>
> sighand = parent->sighand;
> + sig = parent->signal;

This looks unneeded.

Oleg.



\
 
 \ /
  Last update: 2010-12-20 17:31    [from the cache]
©2003-2011 Jasper Spaans