Skip writes if term is closed
This commit is contained in:
parent
0b26241b42
commit
d97cdde38d
2 changed files with 1 additions and 500 deletions
widgets
|
|
@ -120,7 +120,7 @@ func NewTerminal(cmd *exec.Cmd) (*Terminal, error) {
|
|||
buf := make([]byte, 4096)
|
||||
for {
|
||||
n, err := term.pty.Read(buf)
|
||||
if err != nil {
|
||||
if err != nil || term.closed {
|
||||
// These are generally benine errors when the process exits
|
||||
term.Close(nil)
|
||||
return
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue