From aa4f08e18f4879532915e655dcba667d3d0f7376 Mon Sep 17 00:00:00 2001 From: Derek Parker Date: Fri, 21 Nov 2014 17:01:14 -0600 Subject: [PATCH] check tgkill error --- proctl/proctl_linux_amd64.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/proctl/proctl_linux_amd64.go b/proctl/proctl_linux_amd64.go index 0fb0cc5f..e3063a2f 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