提交 0660fcc0 编写于 作者: D Derek Parker

Reap child process for status (OS X)

上级 8b04d877
......@@ -175,7 +175,11 @@ func (dbp *DebuggedProcess) findExecutable() (*macho.File, error) {
func trapWait(dbp *DebuggedProcess, pid int) (int, error) {
port := C.mach_port_wait(dbp.os.exceptionPort)
if port == 0 {
return -1, ProcessExitedError{Pid: dbp.Pid}
_, status, err := wait(dbp.Pid, 0)
if err != nil {
return -1, err
}
return -1, ProcessExitedError{Pid: dbp.Pid, Status: status.ExitStatus()}
}
dbp.updateThreadList()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册