mirror of
https://github.com/yudai/gotty.git
synced 2025-12-23 19:00:13 +01:00
Call Wait() to prevent processes from being defunct
This commit is contained in:
parent
b4b9435b58
commit
2aaa155a3e
1 changed files with 1 additions and 0 deletions
|
|
@ -216,6 +216,7 @@ func (app *App) generateHandler() func(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|
||||||
go func() {
|
go func() {
|
||||||
<-exit
|
<-exit
|
||||||
|
cmd.Wait()
|
||||||
conn.Close()
|
conn.Close()
|
||||||
log.Printf("Connection closed: %s", r.RemoteAddr)
|
log.Printf("Connection closed: %s", r.RemoteAddr)
|
||||||
}()
|
}()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue