Skip to content

Conversation

beldmit
Copy link

@beldmit beldmit commented Apr 22, 2021

OpenSSH incorrectly restores the standard mode (blocking mode) on standard output upon exiting. This causes the next shell scripts commands to potentially fail in EAGAIN.
The reproducer is:

#!/bin/sh
(
ssh localhost true
cat /dev/zero
) | sleep 30

Restoring the blocking modes happens with the duped file descriptors and too late.

The changes causing this problem was introduced in 4d5456c
The previous patches was provided in #244

This is an alternate approach to fix this problem provided by Masaki Kimura

@djmdjm
Copy link
Contributor

djmdjm commented May 19, 2021

Thanks - a similar fix was committed in similar fix was

@djmdjm djmdjm closed this May 19, 2021
@djmdjm
Copy link
Contributor

djmdjm commented May 19, 2021

(err, truncated)

... committed in 7be4ac8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants