From 1893eca41a35a771d45e6074167e5488d9f2a78a Mon Sep 17 00:00:00 2001 From: Junegunn Choi Date: Tue, 2 Feb 2016 17:51:21 +0900 Subject: [PATCH] Handle SIGTERM gracefully (#482) --- src/terminal.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/terminal.go b/src/terminal.go index e5b247d..bd2ad15 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)