Explicitly handle SIGINT

This commit is contained in:
Arturo Filastò 2020-02-07 15:33:37 +01:00
parent e9f7c48262
commit 20fb419126

View File

@ -23,7 +23,7 @@ import (
// flag, probably as part of: https://github.com/ooni/probe-cli/issues/45
func listenForSignals(ctx *ooni.Context) {
s := make(chan os.Signal, 1)
signal.Notify(s, os.Interrupt, syscall.SIGTERM)
signal.Notify(s, os.Interrupt, syscall.SIGINT, syscall.SIGTERM)
go func() {
<-s