update containerd/console to fix race: lock Cond before Signal
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
4
vendor/github.com/containerd/console/console_linux.go
generated
vendored
4
vendor/github.com/containerd/console/console_linux.go
generated
vendored
@@ -262,10 +262,14 @@ func (ec *EpollConsole) Shutdown(close func(int) error) error {
|
||||
|
||||
// signalRead signals that the console is readable.
|
||||
func (ec *EpollConsole) signalRead() {
|
||||
ec.readc.L.Lock()
|
||||
ec.readc.Signal()
|
||||
ec.readc.L.Unlock()
|
||||
}
|
||||
|
||||
// signalWrite signals that the console is writable.
|
||||
func (ec *EpollConsole) signalWrite() {
|
||||
ec.writec.L.Lock()
|
||||
ec.writec.Signal()
|
||||
ec.writec.L.Unlock()
|
||||
}
|
||||
|
Reference in New Issue
Block a user