mirror of
https://github.com/junegunn/fzf.git
synced 2025-11-15 06:43:47 -05:00
Handle SIGTERM gracefully (#482)
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user