proc/native/linux: call postExit when process is killed by SIGINT (#1622)

If we return ErrProcessExited we should also set exited to true.
This commit is contained in:
Alessandro Arzilli
2019-07-18 00:52:28 +02:00
committed by Derek Parker
parent acc9f24a5b
commit 7d25f6eb97

View File

@ -321,6 +321,7 @@ func (dbp *Process) trapWaitInternal(pid int, halt bool) (*Thread, error) {
// TODO(dp) alert user about unexpected signals here.
if err := th.resumeWithSig(int(status.StopSignal())); err != nil {
if err == sys.ESRCH {
dbp.postExit()
return nil, proc.ErrProcessExited{Pid: dbp.pid}
}
return nil, err