Skip to content

Commit

Permalink
Add Cmd.Wait() to prevent creation of zombie child processes see: #1
Browse files Browse the repository at this point in the history
  • Loading branch information
mostlygeek committed Oct 5, 2024
1 parent 4fae7cf commit 476086c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions proxy/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ func (pm *ProxyManager) swapModel(requestedModel string) error {
// kill the current running one to swap it
if pm.currentCmd != nil {
pm.currentCmd.Process.Signal(syscall.SIGTERM)

// wait for it to end
pm.currentCmd.Process.Wait()
}

pm.currentConfig = modelConfig
Expand Down

0 comments on commit 476086c

Please sign in to comment.