diff --git a/arch/x86/kernel/syscall.c b/arch/x86/kernel/syscall.c index d22ebe88..44993442 100644 --- a/arch/x86/kernel/syscall.c +++ b/arch/x86/kernel/syscall.c @@ -1258,7 +1258,7 @@ done: /* Wake up the target only when stopped by ptrace-reporting */ sched_wakeup_thread(tthread, PS_TRACED | PS_STOPPED); } - else if(sig == SIGCONT || ptracecont){ + else if(sig == SIGCONT || ptracecont == 1){ /* Wake up the target only when stopped by SIGSTOP */ sched_wakeup_thread(tthread, PS_STOPPED); tthread->proc->status = PS_RUNNING; diff --git a/kernel/syscall.c b/kernel/syscall.c index 2db813e2..1a3c43d3 100644 --- a/kernel/syscall.c +++ b/kernel/syscall.c @@ -4987,7 +4987,7 @@ static int ptrace_attach(int pid) info.si_signo = SIGSTOP; info.si_code = SI_USER; info._sifields._kill.si_pid = proc->pid; - error = do_kill(mythread, pid, -1, SIGSTOP, &info, 1); + error = do_kill(mythread, pid, -1, SIGSTOP, &info, 2); if (error < 0) { goto out; }