ptrace: revert "ptrace_detach: the wrong wakeup breaks the ERESTARTxxx logic"