Skip to content

Commit

Permalink
mac: fix sst dev freezing on mac when killed
Browse files Browse the repository at this point in the history
  • Loading branch information
thdxr committed Oct 3, 2024
1 parent 08074b4 commit f612707
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/sst/mosaic/multiplexer/tcell-term/vt.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"fmt"
"io"
"log"
"log/slog"
"os"
"os/exec"
"runtime/debug"
Expand Down Expand Up @@ -461,8 +462,11 @@ func (vt *VT) Close() {
vt.mu.Lock()
defer vt.mu.Unlock()
if vt.cmd != nil && vt.cmd.Process != nil {
slog.Info("killing process", "pid", vt.cmd.Process.Pid)
util.TerminateProcess(vt.cmd.Process.Pid)
vt.cmd.Process.Kill()
vt.cmd.Wait()
slog.Info("process killed")
}
vt.pty.Close()
}
Expand Down

0 comments on commit f612707

Please sign in to comment.