bugGNU Screen - Bugs: bug #50588, Mixes external TERM and screen...

 
 

bug #50588: Mixes external TERM and screen TERM when using tputs

Submitted by:  Samuel Thibault <sthibaul>
Submitted on:  Sun 19 Mar 2017 08:06:53 PM UTC  
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed Release:  4.5.0
Fixed Release:  4.6.0 Planned Release:  4.6.0
Work Required:  None

Add a New Comment (Rich Markup)
   

You are not logged in

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

 

Wed 22 Mar 2017 08:50:11 AM UTC, comment #1:

Thanks for patch,
pushed to screen-v4 and master.

Amadeusz Sławiński <amade>
Project Administrator
Sun 19 Mar 2017 08:06:53 PM UTC, original submission:

   Hello,

   While investigating http://bugs.debian.org/857808 , we have found an odd behavior of screen.

   What we are doing is running TERM=vt102 screen, and running a newt interface in there. We noticed that screen then emits \0 characters, e.g. when newt clears to end of line. Those \0 characters pose problem to the actual terminal plugged to this.

   What happens is that ClearArea calls AddCStr(D_CE), and for vt102 D_CE contains <3>, i.e. a delay. ncurses' tput() implements this by emitting \0 padding characters when appropriate, i.e. when xon_xoff is not available. It happens that vt102 does have xon_xoff, so no such character should be emitted. Digging more shows that looks at cur_term, which at that point is "screen", not "vt102".

   This happens because screen first initializes the external term with InitTermcap's call to e_tgetent, and then initializes the internal term with MakeTermcap's call to e_tgetent, thus leaving libterm with the internal term instead of the external. The attached patch fixes this by just setting the external term again, to make sure subsequent tputs() calls will use the external term.

Samuel Thibault <sthibaul>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #40029:  termcap added by sthibaul (255B - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by amade (Posted a comment)
  • -email is unavailable- added by sthibaul (Submitted the item)
  •  

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

    Only logged-in users can vote.

     

     

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-06-29 amade Open/ClosedOpen => Closed
        Fixed ReleaseNone => 4.6.0
    2017-03-22 amade StatusNone => Fixed
        Planned ReleaseNone => 4.6.0
    2017-03-19 sthibaul Attached File- => Added termcap, #40029

    Back to the top


    Powered by Savane 3.4