bugGNU Screen - Bugs: bug #23803, When altscreen is on, man fails...

 
 

bug #23803: When altscreen is on, man fails first time

Submitted by:  Micah Cowan <micahcowan>
Submitted on:  Tue 08 Jul 2008 10:51:29 PM UTC  
 
Category: Program LogicSeverity: 4 - Important
Priority: 8Status: Fixed
Privacy: PublicAssigned to: None
Open/Closed: ClosedRelease: Cur Dev Sources
Fixed Release: 4.1.0Planned Release: 4.1.0
Work Required: 1 - Days

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Fri 08 Aug 2008 12:36:56 AM UTC, comment #5:

Addressed for 4.1.0 in 92e8f8edd9db601a0a59e94708c07004e459cc57
(Not yet in main repo; will push later tonight).

Micah Cowan <micahcowan>
Thu 07 Aug 2008 12:51:57 AM UTC, comment #4:

The problem is apparently due to screen sending SIGWINCH to less. The iread() function in less will return READ_INTR if it's interrupted by any of SIGINT, SIGSTOP, and SIGWINCH. The upstream functions will guard against SIGINT and SIGSTOP resulting in an (END) message, but not SIGWINCH.

Problem is probably twofold: screen's window size was not changed, so there was no good reason to be sending SIGWINCH. However, if the window did happen to change in the middle of a read, less should probably not act like it's at EOF. I'll contact the less folks.

Still, the bigger fault is probably screen's, and should be addressed.

Micah Cowan <micahcowan>
Wed 06 Aug 2008 01:00:04 AM UTC, comment #3:

Note: less is giving the "END" final line, even though it hasn't actually reached the end of its input yet. Perhaps some programs are sending writes of zero length before they send the actual content?

Another idea was that less was being impatient for its input, but

doesn't reproduce the issue.

Micah Cowan <micahcowan>
Mon 14 Jul 2008 07:18:11 PM UTC, comment #2:

Still reproducible with latest less 418.

Not env-var related: verified that script doesn't modify the env.

Micah Cowan <micahcowan>
Mon 14 Jul 2008 06:51:48 PM UTC, comment #1:

I was also able to reproduce this with "hg log | less". Not sure how this differs from cat [some large file] | less, which doesn't seem to produce this.

Hm, doesn't seem to be reliably reproducible, though, unlike with "man man".

Also, annoyingly, can't reproduce the problem running under the "script" command. Environment variable issue? Or perhaps some race condition, where running script slows it down just sufficiently to avoid the problem?

The problem is not an issue with screen not processing sequences correctly; less is literally not sending any output (other than the final "END"). Need to find out what is prompting this behavior from less (less 394).

Micah Cowan <micahcowan>
Tue 08 Jul 2008 10:51:29 PM UTC, original submission:

With altscreen on, running a command such as

$ man man

produces an empty screen the first time. Typing Ctrl-L (sent to man; not Ctrl-A l) fixes it, as does quitting and running man again.

This is with PAGER=less; but I can't seem to reproduce using just less on its own.

$ /usr/bin/screen -- sh -c 'groff -Tascii -man /usr/share/man/man1/man.1 | less'

fails to reproduce.

Reproduced this in the 4.0.3 release and current sources, on gnome-terminal and in xterm.

Micah Cowan <micahcowan>

 

(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 micahcowan (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):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 08 Aug 2008 12:36:56 AM UTCmicahcowanStatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
      Fixed ReleaseNone=>4.1.0
    Tue 08 Jul 2008 10:52:02 PM UTCmicahcowanPriority5 - Normal=>8

    Back to the top


    Powered by Savane 3.1-cleanup1