Skip to content

Commit

Permalink
kill process on tab close
Browse files Browse the repository at this point in the history
  • Loading branch information
pomdtr committed Dec 7, 2023
1 parent 2328423 commit 09be56c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,8 @@ func NewHandler() (http.Handler, error) {
return
}
defer func() {
log.Print("gracefully stopping spawned tty...")
log.Print("killing spawned process")
cmd.Process.Kill()
if err := tty.Close(); err != nil {
log.Printf("failed to close spawned tty gracefully: %s", err)
}
Expand Down

0 comments on commit 09be56c

Please sign in to comment.