shell-async commands now don't create zombie processes (#407)

This commit is contained in:
gotroyb127 2020-07-14 19:44:13 +03:00 committed by GitHub
parent 75e59cdd08
commit f2e3c7a0ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

6
app.go
View File

@ -429,5 +429,11 @@ func (app *app) runShell(s string, args []string, prefix string) {
app.ui.cmdPrefix = ""
app.ui.exprChan <- &callExpr{"load", nil, 1}
}()
case "&":
go func() {
if err := cmd.Wait(); err != nil {
log.Printf("running shell: %s", err)
}
}()
}
}