lkml.org 
[lkml]   [2003]   [Feb]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: heavy handed exit() in latest BK

    On Sat, 8 Feb 2003, Roland McGrath wrote:
    >
    > Ah. Deciding state should be treated as a bitmask is not so hot when
    > TASK_RUNNING is 0.

    Oops. Indeed. TASK_RUNNING isn't a bit at all, it's a lack of sleep.

    Turning the logic the other way around:

    /* Ignore processes that are dead or stopped (except for SIGKILL) */
    mask = TASK_ZOMBIE | TASK_DEAD;
    if (sig != SIGKILL)
    mask != TASK_STOPPED;

    and testing for !((p)->state & mask) should fix it. The mask ends up being
    the states that are _not_ good to send signals for ;)

    Linus

    -
    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: 2005-03-22 13:33    [W:0.019 / U:149.240 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site