1
0

2 Commits

Author SHA1 Message Date
bde115f5df Bump version 2023-04-08 14:57:39 +00:00
d972bae547 Send SIGINT first while killing the container by timeout 2023-04-08 14:50:18 +00:00
2 changed files with 8 additions and 1 deletions

View File

@ -222,6 +222,13 @@ func (c container) Run(workdir string, command string) (output string, err error
timer := time.AfterFunc(c.timeout, func() { timer := time.AfterFunc(c.timeout, func() {
flog.Info().Msg("killing container by timeout") flog.Info().Msg("killing container by timeout")
flog.Debug().Msg("SIGINT")
cmd.Process.Signal(os.Interrupt)
time.Sleep(time.Minute)
flog.Debug().Msg("SIGKILL")
cmd.Process.Kill() cmd.Process.Kill()
}) })
defer timer.Stop() defer timer.Stop()

View File

@ -106,7 +106,7 @@ func main() {
Compact: true, Compact: true,
}), }),
kong.Vars{ kong.Vars{
"version": "2.1.0", "version": "2.1.1",
}, },
) )