proc: implement follow exec mode on Windows (#3507)

This commit is contained in:
Alessandro Arzilli
2023-10-13 16:51:11 +02:00
committed by GitHub
parent 70f21c9f86
commit 20350611ce
8 changed files with 161 additions and 86 deletions

View File

@ -844,6 +844,10 @@ func stop1(cctx *proc.ContinueOnceContext, dbp *nativeProcess, trapthread *nativ
return err1
}
func (procgrp *processGroup) detachChild(dbp *nativeProcess) error {
return procgrp.Detach(dbp.pid, false)
}
func (dbp *nativeProcess) detach(kill bool) error {
for threadID := range dbp.threads {
err := ptraceDetach(threadID, 0)