diff options
author | openshift-ci[bot] <75433959+openshift-ci[bot]@users.noreply.github.com> | 2021-08-17 13:14:22 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-17 13:14:22 +0000 |
commit | de4d7b2f7c5cc8199fefee904f0b4976de812ae9 (patch) | |
tree | 6b43476231046f0f57a63ed2822f0bbe9a499f74 /pkg | |
parent | 8c228bdbd031e5930e6319e8fe25b3ff340919f3 (diff) | |
parent | fe2be7f886ac3be68a1899eeb63f756d6fe3d744 (diff) | |
download | podman-de4d7b2f7c5cc8199fefee904f0b4976de812ae9.tar.gz podman-de4d7b2f7c5cc8199fefee904f0b4976de812ae9.tar.bz2 podman-de4d7b2f7c5cc8199fefee904f0b4976de812ae9.zip |
Merge pull request #11240 from vrothberg/art
make sure that signal buffers are sufficiently big
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/domain/infra/abi/terminal/sigproxy_linux.go | 6 | ||||
-rw-r--r-- | pkg/rootless/rootless_linux.go | 3 |
2 files changed, 6 insertions, 3 deletions
diff --git a/pkg/domain/infra/abi/terminal/sigproxy_linux.go b/pkg/domain/infra/abi/terminal/sigproxy_linux.go index 26e199aee..a9bd2d5fb 100644 --- a/pkg/domain/infra/abi/terminal/sigproxy_linux.go +++ b/pkg/domain/infra/abi/terminal/sigproxy_linux.go @@ -12,13 +12,17 @@ import ( "github.com/sirupsen/logrus" ) +// Make sure the signal buffer is sufficiently big. +// runc is using the same value. +const signalBufferSize = 2048 + // ProxySignals ... func ProxySignals(ctr *libpod.Container) { // Stop catching the shutdown signals (SIGINT, SIGTERM) - they're going // to the container now. shutdown.Stop() - sigBuffer := make(chan os.Signal, 128) + sigBuffer := make(chan os.Signal, signalBufferSize) signal.CatchAll(sigBuffer) logrus.Debugf("Enabling signal proxying") diff --git a/pkg/rootless/rootless_linux.go b/pkg/rootless/rootless_linux.go index 9ef56acb4..c046ecde7 100644 --- a/pkg/rootless/rootless_linux.go +++ b/pkg/rootless/rootless_linux.go @@ -397,8 +397,6 @@ func becomeRootInUserNS(pausePid, fileToRead string, fileOutput *os.File) (_ boo return false, -1, errors.Wrapf(err, "error setting up the process") } - c := make(chan os.Signal, 1) - signals := []os.Signal{} for sig := 0; sig < numSig; sig++ { if sig == int(unix.SIGTSTP) { @@ -407,6 +405,7 @@ func becomeRootInUserNS(pausePid, fileToRead string, fileOutput *os.File) (_ boo signals = append(signals, unix.Signal(sig)) } + c := make(chan os.Signal, len(signals)) gosignal.Notify(c, signals...) defer gosignal.Reset() go func() { |