Re: [dev] [st] Flow control support

From: <noname_AT_inventati.org>
Date: Mon, 20 Apr 2015 00:47:59 +0300

On Sun, Apr 19, 2015 at 02:52:18PM -0400, Alex Pilon wrote:
> On Sun, Apr 19, 2015 at 02:36:35PM -0300, Amadeus Folego wrote:
> > Alex, you just posted the diffstat, not the patch itself.
>
> I know. I was only proving a point about it being small and trying to
> reduce the noise, though moot now. Should have attached it in the first
> place. Made it shorter now too. Did it with a custom key function
> instead of in tcontrolcode, silly me.
>
> Both TCO{ON,OFF} and TCI{ON,OFF} work. Not sure which one is more
> correct.

Probably TCO version does not work on non-virtual terminals. TCI version
just sends ^S and ^Q to the tty.

I tested your patch. I saved '' to 1.txt and did 'cat 1.txt' in xterm,
unpatched st and patched st. Patched st locked up while others keep
working.

Your patch makes st echo STOP and START signals. It is just wrong. If
the other end says 'STOP', st should stop sending and buffer what it is
going to send. It is already done in the kernel so we should not worry
about it even if the other end is a real terminal and user pastes a huge
buffer into the terminal. Your patch just asks the other end to STOP
too, it makes no sense.

If you want to send ^S and ^Q to the pty manually, you just need to
enable their support using 'stty ixon'. They are handled by the pty, not
st. I just checked that it works.

Current behaviour of st is to ignore XON and XOFF sent by the other end
because they should not break STR sequence as they may be sent by the
other end as soon as it thinks that its buffer is going to fill up. I
think it is the correct behaviour.
Received on Sun Apr 19 2015 - 23:47:59 CEST

This archive was generated by hypermail 2.3.0 : Mon Apr 20 2015 - 00:00:19 CEST