Add Cmd.Wait() to prevent creation of zombie child processes see: #1
This commit is contained in:
@@ -57,6 +57,9 @@ func (pm *ProxyManager) swapModel(requestedModel string) error {
|
|||||||
// kill the current running one to swap it
|
// kill the current running one to swap it
|
||||||
if pm.currentCmd != nil {
|
if pm.currentCmd != nil {
|
||||||
pm.currentCmd.Process.Signal(syscall.SIGTERM)
|
pm.currentCmd.Process.Signal(syscall.SIGTERM)
|
||||||
|
|
||||||
|
// wait for it to end
|
||||||
|
pm.currentCmd.Process.Wait()
|
||||||
}
|
}
|
||||||
|
|
||||||
pm.currentConfig = modelConfig
|
pm.currentConfig = modelConfig
|
||||||
|
|||||||
Reference in New Issue
Block a user