ptyfwd: do not try to read from PTYForward.input_fd when read-only mode
Fixes the following error message (the last line): ``` [FAILED] Failed to start TEST-60-MOUNT-RATELIMIT.service. Sending SIGTERM to remaining processes... Sending SIGKILL to remaining processes... All filesystems, swaps, loop devices, MD devices and DM devices detached. Exiting container. Failed to read from pty input fd: Bad file descriptor ``` Follow-up forb823809bcaandcf89e48028.
This commit is contained in:
committed by
Luca Boccassi
parent
b5be05a106
commit
73c4350fda
+1
-1
@@ -810,7 +810,7 @@ static int shovel_force(PTYForward *f) {
|
||||
|
||||
if (!f->master_hangup)
|
||||
f->master_writable = f->master_readable = true;
|
||||
if (!f->stdin_hangup)
|
||||
if (!f->stdin_hangup && f->input_fd >= 0)
|
||||
f->stdin_readable = true;
|
||||
if (!f->stdout_hangup)
|
||||
f->stdout_writable = true;
|
||||
|
||||
Reference in New Issue
Block a user