widgets/terminal: Reap more zombies

The editor and pager were not properly being reaped, causing resource
leakage whenever a user replies to a message.

Signed-off-by: Kevin Kuehler <keur@xcf.berkeley.edu>
This commit is contained in:
Kevin Kuehler 2019-11-21 11:24:40 -08:00 committed by Drew DeVault
parent eff8208cd9
commit 06f81e8cd9
1 changed files with 1 additions and 0 deletions

View File

@ -180,6 +180,7 @@ func (term *Terminal) Close(err error) {
} }
if term.cmd != nil && term.cmd.Process != nil { if term.cmd != nil && term.cmd.Process != nil {
term.cmd.Process.Kill() term.cmd.Process.Kill()
term.cmd.Wait()
term.cmd = nil term.cmd = nil
} }
if !term.closed && term.OnClose != nil { if !term.closed && term.OnClose != nil {