fix(auth): close cancellation and workspace races

This commit is contained in:
2026-08-17 19:32:03 +02:00
parent d12b629420
commit 0a2c667231
10 changed files with 822 additions and 221 deletions
@@ -15,6 +15,25 @@ func configureProcess(command *exec.Cmd) {
command.SysProcAttr = &syscall.SysProcAttr{Setpgid: true}
}
type unixProcessLifetime struct {
command *exec.Cmd
}
func startProcess(command *exec.Cmd) (processLifetime, error) {
if err := command.Start(); err != nil {
return nil, err
}
return unixProcessLifetime{command: command}, nil
}
func (process unixProcessLifetime) terminate(done <-chan error) error {
return terminateProcess(process.command, done)
}
func (unixProcessLifetime) close() error {
return nil
}
func terminateProcess(command *exec.Cmd, done <-chan error) error {
if command.Process == nil {
return nil