[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] tee: recover from EAGAIN returned from fwrite()
From: |
Kamil Dudka |
Subject: |
Re: [PATCH] tee: recover from EAGAIN returned from fwrite() |
Date: |
Tue, 11 Sep 2018 09:50:19 +0200 |
On Tuesday, September 11, 2018 6:49:09 AM CEST Pádraig Brady wrote:
> On 10/09/18 09:38, Kamil Dudka wrote:
> > On Friday, September 7, 2018 5:21:04 AM CEST Pádraig Brady wrote:
> >> Also would `cat | telnet ... | tee blah` be a workaround?
> >
> > The above command does not really work because telnet is unable to set all
> > the other needed properties on the terminal. So it let me write my
> > password on the screen (because 'echo' was not disabled), arrow keys in
> > my shell session did not work, etc.
>
> Right. However if telnet wants low level control of the terminal
> and tee is unsetting fundamental IO behaviors of the tty like this,
> then it wouldn't be general for all uses of telnet (like connecting
> to a non line oriented remote session for example).
Fair point. What about the attached patch instead?
Kamil
> I.E. this isn't a general solution for all coreutils, or even for tee.
>
> Options:
>
> If one wants simple line oriented connection use netcat or equivalent.
>
> Use script(1) which is more suited to recording terminal sessions.
>
> Adjust telnet to not use FIONBIO when in line mode.
>
> Avoid the tee apparent hang by using the --output-error=exit option.
>
> cheers,
> Pádraig
0001-tee-handle-EAGAIN-returned-from-fwrite.patch
Description: Text Data