pkg/signal: ignore SIGTOP for signal proxy

It makes no sense to forward it, SIGSTOP cannot be handled by
userspace (like SIGKILL) and it didn't do anything before so this just
makes it more explicit.

Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
Paul Holzinger 2025-04-30 18:19:16 +02:00
parent a4d0067249
commit 941a6d0c05
No known key found for this signature in database
GPG Key ID: EB145DD938A3CAF2
3 changed files with 21 additions and 3 deletions

View File

@ -94,5 +94,11 @@ 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
// SIGSTOP cannot be ignored/forwarded by userspace.
switch s {
case syscall.SIGCHLD, syscall.SIGPIPE, syscall.SIGURG, syscall.SIGSTOP:
return true
default:
return false
}
}

View File

@ -94,5 +94,11 @@ 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
// SIGSTOP cannot be ignored/forwarded by userspace.
switch s {
case syscall.SIGCHLD, syscall.SIGPIPE, syscall.SIGURG, syscall.SIGSTOP:
return true
default:
return false
}
}

View File

@ -92,5 +92,11 @@ 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
// SIGSTOP cannot be ignored/forwarded by userspace.
switch s {
case syscall.SIGCHLD, syscall.SIGPIPE, syscall.SIGURG, syscall.SIGSTOP:
return true
default:
return false
}
}