mirror of
https://github.com/containers/podman.git
synced 2025-06-22 18:08:11 +08:00
Merge pull request #16323 from mheon/lock_during_kill
Ensure that StartAndAttach locks while sending signals
This commit is contained in:
@ -282,6 +282,8 @@ func (c *Container) Attach(streams *define.AttachStreams, keys string, resize <-
|
||||
if c.Terminal() {
|
||||
go func() {
|
||||
<-attachRdy
|
||||
c.lock.Lock()
|
||||
defer c.lock.Unlock()
|
||||
if err := c.ociRuntime.KillContainer(c, uint(signal.SIGWINCH), false); err != nil {
|
||||
logrus.Warnf("Unable to send SIGWINCH to container %s after attach: %v", c.ID(), err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user