Skip to content
Myr

Handle SIGTERM gracefully (#482)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Junegunn Choi · committed by Junegunn Choi · parent 8206746 · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:src/terminal.go+1 added-1 removed
732 unmodified lines
733func (t *Terminal) Loop() {734 <-t.startChan735 { // Late initialization736 intChan := make(chan os.Signal, 1)737 signal.Notify(intChan, os.Interrupt, os.Kill)737 signal.Notify(intChan, os.Interrupt, os.Kill, syscall.SIGTERM)738 go func() {739 <-intChan740 t.reqBox.Set(reqQuit, nil)741 }()
433 unmodified lines