diff --git a/proctl/proctl_linux_amd64.go b/proctl/proctl_linux_amd64.go index 0fb0cc5f4ef9d81089c16c956ce96ac2eb73397e..e3063a2f0761e91998c66f990ce9d126333efe69 100644 --- a/proctl/proctl_linux_amd64.go +++ b/proctl/proctl_linux_amd64.go @@ -569,9 +569,10 @@ func timeoutWait(thread *ThreadContext, options int) (int, *syscall.WaitStatus, case s := <-statchan: return s.pid, s.status, nil case <-time.After(2 * time.Second): - syscall.Tgkill(thread.Process.Pid, pid, syscall.SIGSTOP) + if err := syscall.Tgkill(thread.Process.Pid, pid, syscall.SIGSTOP); err != nil { + return -1, nil, err + } <-statchan - return 0, nil, TimeoutError{pid} case err := <-errchan: return -1, nil, err