Merge pull request #3906 from estesp/update-console-vendor

Update containerd/console vendor for fix
This commit is contained in:
Maksym Pavlenko 2019-12-20 10:38:56 -08:00 committed by GitHub
commit 97712c8ad7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View File

@ -2,7 +2,7 @@ github.com/beorn7/perks 4c0e84591b9aa9e6dcfdf3e02011
github.com/BurntSushi/toml 3012a1dbe2e4bd1391d42b32f0577cb7bbc7f005 # v0.3.1 github.com/BurntSushi/toml 3012a1dbe2e4bd1391d42b32f0577cb7bbc7f005 # v0.3.1
github.com/containerd/btrfs af5082808c833de0e79c1e72eea9fea239364877 github.com/containerd/btrfs af5082808c833de0e79c1e72eea9fea239364877
github.com/containerd/cgroups fada802a7909d430bd17126fd6e4bbf5716f2bcd github.com/containerd/cgroups fada802a7909d430bd17126fd6e4bbf5716f2bcd
github.com/containerd/console 02ecf6a7291e65f4a361525245c2bea023dc2e0b github.com/containerd/console 8375c3424e4d7b114e8a90a4a40c8e1b40d1d4e6
github.com/containerd/continuity f2a389ac0a02ce21c09edd7344677a601970f41c github.com/containerd/continuity f2a389ac0a02ce21c09edd7344677a601970f41c
github.com/containerd/fifo bda0ff6ed73c67bfb5e62bc9c697f146b7fd7f13 github.com/containerd/fifo bda0ff6ed73c67bfb5e62bc9c697f146b7fd7f13
github.com/containerd/go-runc a5c2862aed5e6358b305b0e16bfce58e0549b1cd github.com/containerd/go-runc a5c2862aed5e6358b305b0e16bfce58e0549b1cd

View File

@ -58,6 +58,7 @@ type Epoller struct {
efd int efd int
mu sync.Mutex mu sync.Mutex
fdMapping map[int]*EpollConsole fdMapping map[int]*EpollConsole
closeOnce sync.Once
} }
// NewEpoller returns an instance of epoller with a valid epoll fd. // NewEpoller returns an instance of epoller with a valid epoll fd.
@ -151,7 +152,11 @@ func (e *Epoller) getConsole(sysfd int) *EpollConsole {
// Close closes the epoll fd // Close closes the epoll fd
func (e *Epoller) Close() error { func (e *Epoller) Close() error {
return unix.Close(e.efd) closeErr := os.ErrClosed // default to "file already closed"
e.closeOnce.Do(func() {
closeErr = unix.Close(e.efd)
})
return closeErr
} }
// EpollConsole acts like a console but registers its file descriptor with an // EpollConsole acts like a console but registers its file descriptor with an