diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2017-10-02 13:38:03 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2017-10-02 13:57:04 +0200 |
| commit | 1cfc52435426d1666187041d55b6bdf769f05fb6 (patch) | |
| tree | d94565c2f2334f87cdd2ac10bea91fc2f5fddbdc /pkg/osutil | |
| parent | 2f204f6b964fcf54ffdb92f525b78527a12986c3 (diff) | |
syz-fuzzer: use osutil.HandleInterrupts instead of custom code
We already have osutil.HandleInterrupts for this.
Simplifies porting to new OSes.
Diffstat (limited to 'pkg/osutil')
| -rw-r--r-- | pkg/osutil/osutil_unix.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/osutil/osutil_unix.go b/pkg/osutil/osutil_unix.go index 01eabc15b..818cc1f71 100644 --- a/pkg/osutil/osutil_unix.go +++ b/pkg/osutil/osutil_unix.go @@ -70,7 +70,7 @@ func ProcessTempDir(where string) (string, error) { func HandleInterrupts(shutdown chan struct{}) { go func() { c := make(chan os.Signal, 3) - signal.Notify(c, syscall.SIGINT) + signal.Notify(c, syscall.SIGINT, syscall.SIGTERM) <-c close(shutdown) fmt.Fprint(os.Stderr, "SIGINT: shutting down...\n") |
