mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2024-11-23 05:12:08 +00:00
Handle SIGTERM gracefully (#482)
This commit is contained in:
parent
82067463b8
commit
1893eca41a
@ -734,7 +734,7 @@ func (t *Terminal) Loop() {
|
|||||||
<-t.startChan
|
<-t.startChan
|
||||||
{ // Late initialization
|
{ // Late initialization
|
||||||
intChan := make(chan os.Signal, 1)
|
intChan := make(chan os.Signal, 1)
|
||||||
signal.Notify(intChan, os.Interrupt, os.Kill)
|
signal.Notify(intChan, os.Interrupt, os.Kill, syscall.SIGTERM)
|
||||||
go func() {
|
go func() {
|
||||||
<-intChan
|
<-intChan
|
||||||
t.reqBox.Set(reqQuit, nil)
|
t.reqBox.Set(reqQuit, nil)
|
||||||
|
Loading…
Reference in New Issue
Block a user