diff --git a/signal_syscall.go b/signal_syscall.go new file mode 100644 index 0000000000..4a4d956573 --- /dev/null +++ b/signal_syscall.go @@ -0,0 +1,16 @@ +// Copyright (c) 2021-2022 The Decred developers +// Use of this source code is governed by an ISC +// license that can be found in the LICENSE file. +// +//go:build windows || aix || android || darwin || dragonfly || freebsd || hurd || illumos || ios || linux || netbsd || openbsd || solaris +// +build windows aix android darwin dragonfly freebsd hurd illumos ios linux netbsd openbsd solaris + +package main + +import ( + "syscall" +) + +func init() { + interruptSignals = append(interruptSignals, syscall.SIGTERM, syscall.SIGHUP) +} diff --git a/signal_unix.go b/signal_unix.go deleted file mode 100644 index 5f0b7ce733..0000000000 --- a/signal_unix.go +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright (c) 2016 The btcsuite developers -// Copyright (c) 2021 The Decred developers -// Use of this source code is governed by an ISC -// license that can be found in the LICENSE file. - -//go:build darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris -// +build darwin dragonfly freebsd linux netbsd openbsd solaris - -package main - -import ( - "os" - "syscall" -) - -func init() { - interruptSignals = []os.Signal{ - os.Interrupt, - syscall.SIGTERM, - syscall.SIGHUP, - } -}