Skip to content

Commit

Permalink
Merge pull request #570 from crosbymichael/tty-nil
Browse files Browse the repository at this point in the history
Check if tty is nil in handler
  • Loading branch information
LK4D4 committed Feb 17, 2016
2 parents 382880b + 546af43 commit 488e315
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion signals.go
Original file line number Diff line number Diff line change
Expand Up @@ -109,5 +109,8 @@ func (h *signalHandler) reap() (exits []exit, err error) {
}

func (h *signalHandler) Close() error {
return h.tty.Close()
if h.tty != nil {
return h.tty.Close()
}
return nil
}

0 comments on commit 488e315

Please sign in to comment.