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

 
 

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

Submitted by:  Kalle Olavi Niemitalo <kon>
Submitted on:  Sun 10 Jul 2016 07:45:26 PM UTC  
 
Category: Hurd ServersSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Hardware Support
Status: NonePrivacy: Public
Assigned to: NoneOriginator Name: 
Open/Closed: OpenReproducibility: Every Time
Size (loc): NonePlanned Release: None
Effort: 0.00
Wiki-like text discussion box: 

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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 File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    No Changes Have Been Made to This Item

    Back to the top


    Powered by Savane 3.1-cleanup1