• Andrew Vagin's avatar
    ptrace: send SIGSTOP to restore the stopped state · 6cc31661
    Andrew Vagin authored
    If a task was in a stopped state before we started to ptrace-seize
    it, this stopped state will be restored by kernel upon detach.
    
    If SIGSTOP was only in a task queue, we need to send it by hands
    again bedore detaching. Otherwise we clean stop from queue (to
    run parasite) and seize will restore task as running.
    
    And, since SIGSTOP doesn't affect states of already stopped tasks,
    we can send it to then safely and not distinguish stopped from
    stop-queued ones.
    
    Reported-by: Mr Jenkins
    Signed-off-by: 's avatarAndrew Vagin <avagin@virtuozzo.com>
    Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
    6cc31661
ptrace.c 7.08 KB