lkml.org 
[lkml]   [2011]   [Jun]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 2/8] kill tracehook_notify_death()
    Hello, Oleg.

    On Wed, Jun 22, 2011 at 11:08:34PM +0200, Oleg Nesterov wrote:
    > Kill tracehook_notify_death(), reimplement the logic in its caller,
    > exit_notify().
    >
    > This also fixes a minor bug, if the exiting task is the group_leader
    > and it is traced by its real_parent, tracehook_notify_death() returns
    > task->exit_signal or SIGCHLD depending on thread_group_empty(), this
    > looks strange.

    Maybe we should do the above in a separate patch?

    > - if (tsk->exit_signal != SIGCHLD && !task_detached(tsk) &&
    > + if (thread_group_leader(tsk) && tsk->exit_signal != SIGCHLD &&

    Hmmm... it probably depends on POV but wouldn't (exit_signal != -1 &&
    exit_signal != SIGCHLD) be easier? The logic here is about demoting
    specials sigs to SIGCHLD under certain circumstances and the check is
    there to prevent promoting -1 to SIGCHLD. I agree the detached() is
    more distracting than helping but thread_group_leader() seems
    unnecessarily indirect.

    Thanks.

    --
    tejun


    \
     
     \ /
      Last update: 2011-06-23 14:25    [W:4.371 / U:0.540 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site