diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2016-02-02 17:51:21 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2016-02-02 17:51:21 +0900 |
commit | 1893eca41a35a771d45e6074167e5488d9f2a78a (patch) | |
tree | 24ef43ade90895172e94a4608c0a386a246fcffe | |
parent | 82067463b8263692147d80b6fc909f1d98693d88 (diff) |
Handle SIGTERM gracefully (#482)
-rw-r--r-- | src/terminal.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/terminal.go b/src/terminal.go index e5b247d7..bd2ad15f 100644 --- a/src/terminal.go +++ b/src/terminal.go @@ -734,7 +734,7 @@ func (t *Terminal) Loop() { <-t.startChan { // Late initialization intChan := make(chan os.Signal, 1) - signal.Notify(intChan, os.Interrupt, os.Kill) + signal.Notify(intChan, os.Interrupt, os.Kill, syscall.SIGTERM) go func() { <-intChan t.reqBox.Set(reqQuit, nil) |