bugThe GNU Hurd - Bugs: bug #48458, after stty ixoff, term sends XOFF...


bug #48458: after stty ixoff, term sends XOFF automatically, but not XON

Submitter:  Kalle Olavi Niemitalo <kon>
Submitted:  Sun 10 Jul 2016 07:45:26 PM UTC
Category:  Hurd Servers Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Hardware Support
Status:  None Privacy:  Public
Assigned to:  None Originator Name: 
Open/Closed:  Open Reproducibility:  Every Time
Size (loc):  None Planned Release:  None
Effort:  0.00
Wiki-like text discussion box: 

* Mandatory Fields

Add a New Comment Rich Markup

Sun 10 Jul 2016 07:45:26 PM UTC, original submission:  

If the IXOFF input mode is enabled (e.g. with "stty ixoff"), and too much data comes in from the terminal, then term/munge.c (input_character) sends an XOFF character to the terminal, which should recognize the XOFF and stop sending data.  If a program then reads the data from the input buffer, the term translator should send a XON character to the terminal so that the terminal will start sending data again.  However, the translator never sends this XON.  (The XON and XOFF characters can be replaced with other characters, by setting c_cc[VSTART] and c_cc[VSTOP] in struct termios.)

(Related to this, input_character sets the SENT_VSTOP flag in termflags when it sends the XOFF character, but nothing never checks or clears that flag.)

To test this, first run "stty sane ixoff start '{' stop '}'" to enable the generation of XON/XOFF and replace the characters with something visible.  Then run "cat" and paste 8100 "a" characters.  (This number is QUEUE_HIWAT in term/term.h.)  Type "1" and then "2".  The "2" does not echo; "}" is output instead.  Press ^U, which is the KILL character and clears the input buffer.  The term translator should now output "{" to the terminal, but does not.

(Also, it is wrong that the term translator sends this XOFF only when the buffer is entirely full and a received character is about to be discarded.  It should send the XOFF when there is still room in the buffer, so that the terminal has some time to react.)

Kalle Olavi Niemitalo <kon>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by kon (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.


    No changes have been made to this item

    Back to the top

    Powered by Savane 3.12.
    Corresponding source code