提交 aa4f08e1 编写于 作者: D Derek Parker

check tgkill error

上级 fe24276b
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册