From f2e3c7a0ce43c6189c3819124df54de1a89881dd Mon Sep 17 00:00:00 2001 From: gotroyb127 <62418822+gotroyb127@users.noreply.github.com> Date: Tue, 14 Jul 2020 19:44:13 +0300 Subject: [PATCH] shell-async commands now don't create zombie processes (#407) --- app.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app.go b/app.go index 3b4541c..fbc24e1 100644 --- a/app.go +++ b/app.go @@ -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) + } + }() } }