add graceful process termination on windows (#82)

This commit is contained in:
Grigorii Khvatskii
2025-03-25 18:26:33 -04:00
committed by GitHub
parent 84e2c07a7e
commit 4c3aa40564
3 changed files with 26 additions and 1 deletions

View File

@@ -304,7 +304,9 @@ func (p *Process) stopCommand(sigtermTTL time.Duration) {
return
}
p.cmd.Process.Signal(syscall.SIGTERM)
if err := p.terminateProcess(); err != nil {
fmt.Fprintf(p.logMonitor, "!!! failed to gracefully terminate process [%s]: %v\n", p.ID, err)
}
select {
case <-sigtermTimeout.Done():