mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-10 21:53:57 +08:00
Check error return values
Both tty.resize and notifySocket.setupSocket return an error which isn't handled in the caller. Fix this and either log or propagate the errors. Found using https://github.com/mvdan/unparam Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
This commit is contained in:
+6
-2
@@ -75,11 +75,15 @@ func (h *signalHandler) forward(process *libcontainer.Process, tty *tty, detach
|
||||
}
|
||||
|
||||
// perform the initial tty resize.
|
||||
tty.resize()
|
||||
if err := tty.resize(); err != nil {
|
||||
logrus.Error(err)
|
||||
}
|
||||
for s := range h.signals {
|
||||
switch s {
|
||||
case unix.SIGWINCH:
|
||||
tty.resize()
|
||||
if err := tty.resize(); err != nil {
|
||||
logrus.Error(err)
|
||||
}
|
||||
case unix.SIGCHLD:
|
||||
exits, err := h.reap()
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user