summaryrefslogtreecommitdiff
path: root/pkg/signal/signal_unix.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-09-22 17:06:45 +0200
committerGitHub <noreply@github.com>2022-09-22 17:06:45 +0200
commit8bf3535447fe9f482b329e962e173ade26456e6d (patch)
tree39375c55d8bda145631c4d739fdf3013945b8ad1 /pkg/signal/signal_unix.go
parent828fae12971c5a7b9807c8c4f8e029fe5d0ddc2f (diff)
parent7cfe0328f1c231ed318c38938479f7dec7fc97fa (diff)
downloadpodman-8bf3535447fe9f482b329e962e173ade26456e6d.tar.gz
podman-8bf3535447fe9f482b329e962e173ade26456e6d.tar.bz2
podman-8bf3535447fe9f482b329e962e173ade26456e6d.zip
Merge pull request #15131 from boaz0/closes_14707
Add support to sig-proxy for podman-remote
Diffstat (limited to 'pkg/signal/signal_unix.go')
-rw-r--r--pkg/signal/signal_unix.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/pkg/signal/signal_unix.go b/pkg/signal/signal_unix.go
index 7919e3670..01d99d7bc 100644
--- a/pkg/signal/signal_unix.go
+++ b/pkg/signal/signal_unix.go
@@ -87,3 +87,11 @@ var SignalMap = map[string]syscall.Signal{
"RTMAX-1": sigrtmax - 1,
"RTMAX": sigrtmax,
}
+
+// IsSignalIgnoredBySigProxy determines whether sig-proxy should ignore syscall signal
+func IsSignalIgnoredBySigProxy(s syscall.Signal) bool {
+ // Ignore SIGCHLD and SIGPIPE - these are most likely intended for the podman command itself.
+ // SIGURG was added because of golang 1.14 and its preemptive changes causing more signals to "show up".
+ // https://github.com/containers/podman/issues/5483
+ return s == syscall.SIGCHLD || s == syscall.SIGPIPE || s == syscall.SIGURG
+}