Merge pull request #570 from crosbymichael/tty-nil

Check if tty is nil in handler
This commit is contained in:
Alexander Morozov 2016-02-17 13:37:21 -08:00
commit 488e315c21
1 changed files with 4 additions and 1 deletions

View File

@ -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
}