From 7d25f6eb978d083e8e99e73d5d337828a9c896e6 Mon Sep 17 00:00:00 2001 From: Alessandro Arzilli Date: Thu, 18 Jul 2019 00:52:28 +0200 Subject: [PATCH] proc/native/linux: call postExit when process is killed by SIGINT (#1622) If we return ErrProcessExited we should also set exited to true. --- pkg/proc/native/proc_linux.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/proc/native/proc_linux.go b/pkg/proc/native/proc_linux.go index fc4a5898..d4f4d221 100644 --- a/pkg/proc/native/proc_linux.go +++ b/pkg/proc/native/proc_linux.go @@ -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