From 66c62eb96816d7eb021da22d439838510d61f916 Mon Sep 17 00:00:00 2001 From: Doug Rabson Date: Sun, 8 May 2022 12:52:34 +0100 Subject: Implement CatchAll and StopCatch in signal_common.go This is part of a set of changes to port podman to the FreeBSD platform. The pkg/signal parts are needed to enable ABI mode on FreeBSD. No tests are needed here because it should be a functional no-op for linux. [NO NEW TESTS NEEDED] Signed-off-by: Doug Rabson --- pkg/signal/signal_linux_mipsx.go | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'pkg/signal/signal_linux_mipsx.go') diff --git a/pkg/signal/signal_linux_mipsx.go b/pkg/signal/signal_linux_mipsx.go index 9021a10e7..cdf9ad4c5 100644 --- a/pkg/signal/signal_linux_mipsx.go +++ b/pkg/signal/signal_linux_mipsx.go @@ -10,8 +10,6 @@ package signal // NOTE: this package has originally been copied from github.com/docker/docker. import ( - "os" - "os/signal" "syscall" "golang.org/x/sys/unix" @@ -92,18 +90,3 @@ var SignalMap = map[string]syscall.Signal{ "RTMAX-1": sigrtmax - 1, "RTMAX": sigrtmax, } - -// CatchAll catches all signals and relays them to the specified channel. -func CatchAll(sigc chan os.Signal) { - handledSigs := make([]os.Signal, 0, len(SignalMap)) - for _, s := range SignalMap { - handledSigs = append(handledSigs, s) - } - signal.Notify(sigc, handledSigs...) -} - -// StopCatch stops catching the signals and closes the specified channel. -func StopCatch(sigc chan os.Signal) { - signal.Stop(sigc) - close(sigc) -} -- cgit v1.2.3-54-g00ecf