fix(docs): bound i18n codex prompt cleanup

This commit is contained in:
Vincent Koc
2026-04-29 17:47:02 -07:00
parent a548d8e1ea
commit 5a631e1ee9
4 changed files with 93 additions and 5 deletions

View File

@@ -0,0 +1,25 @@
//go:build !windows
package main
import (
"errors"
"os"
"os/exec"
"syscall"
)
func configureCodexPromptCommand(command *exec.Cmd) {
command.SysProcAttr = &syscall.SysProcAttr{Setpgid: true}
command.Cancel = func() error {
if command.Process == nil {
return os.ErrProcessDone
}
err := syscall.Kill(-command.Process.Pid, syscall.SIGKILL)
if errors.Is(err, syscall.ESRCH) {
return os.ErrProcessDone
}
return err
}
command.WaitDelay = docsI18nCommandWaitDelay()
}