Merge pull request #1575 from cyphar/tty-resize-ignore-errors
signal: ignore tty.resize errors
This commit is contained in:
commit
aea4f21eec
13
signals.go
13
signals.go
|
@ -74,16 +74,15 @@ func (h *signalHandler) forward(process *libcontainer.Process, tty *tty, detach
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// perform the initial tty resize.
|
// Perform the initial tty resize. Always ignore errors resizing because
|
||||||
if err := tty.resize(); err != nil {
|
// stdout might have disappeared (due to races with when SIGHUP is sent).
|
||||||
logrus.Error(err)
|
_ = tty.resize()
|
||||||
}
|
// Handle and forward signals.
|
||||||
for s := range h.signals {
|
for s := range h.signals {
|
||||||
switch s {
|
switch s {
|
||||||
case unix.SIGWINCH:
|
case unix.SIGWINCH:
|
||||||
if err := tty.resize(); err != nil {
|
// Ignore errors resizing, as above.
|
||||||
logrus.Error(err)
|
_ = tty.resize()
|
||||||
}
|
|
||||||
case unix.SIGCHLD:
|
case unix.SIGCHLD:
|
||||||
exits, err := h.reap()
|
exits, err := h.reap()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue