Restoring block mode on exiting

Dmitry Belyavskiy dbelyavs at redhat.com
Sun Apr 25 18:53:50 AEST 2021


Hi David,


On Sun, Apr 25, 2021 at 2:34 AM David Newall <openssh at davidnewall.com>
wrote:

> Hi Dmitry,
>
> On 24/4/21 12:41 am, Dmitry Belyavskiy wrote:
> > Could you please take a look at the updated version of the patch?
> > If I understand correctly, it provides the same blocking state after
> > closing
> > the channel as it was before closing.
>
> Yes, generally right, but, I feel you've assumed that the files are
> initially
> blocking which is not necessarily so.
>

I think I don't - see the lines 341-354 of the channels.c in the proposed
patch


> Also, the file is closed immediately after clearing blocking mode.  I think
> it's worth a comment to say that the file being set to blocking mode is an
> alias for stdin, out or err.
>

Will do, thanks!

-- 
Dmitry Belyavskiy


More information about the openssh-unix-dev mailing list