Bug 596671 - 'stty sane' breaks cbreak mode in /usr/bin/less
'stty sane' breaks cbreak mode in /usr/bin/less
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: tcsh (Show other bugs)
5.5
x86_64 Linux
low Severity medium
: rc
: ---
Assigned To: Roman Kollár
BaseOS QE - Apps
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2010-05-27 05:44 EDT by Olle Liljenzin
Modified: 2013-01-17 12:30 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-01-17 12:30:45 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Olle Liljenzin 2010-05-27 05:44:06 EDT
Description of problem:
'stty sane' in /etc/profile.d/local.csh breaks cbreak mode in less and commands will not be executed before a newline is sent.

Version-Release number of selected component (if applicable):
less-436-2.el5

How reproducible:
Always

Steps to Reproduce:
1. Insert the line 'stty sane' in /etc/profile.d/local.csh
2. login with tcsh as default shell
3. run 'less /etc/termcap' and press space button to scroll
  
Actual results:
Text is not scrolled before a newline is sent

Expected results:
Text should scroll down immediately when a space is sent

Additional info:
Does not happen if the variable LESSOPEN is unset or set to an empty string
Comment 1 RHEL Product and Program Management 2011-05-31 10:14:57 EDT
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.
Comment 2 Vojtech Vitek 2012-03-07 12:20:00 EST
I could reproduce the bug, let's check the source codes for screen refresh while using 'stty sane'.
Comment 3 Martin Bříza 2012-06-06 09:16:19 EDT
The component has changed its owner to me, so I'm assigning the bug to myself.
Comment 4 RHEL Product and Program Management 2012-06-11 21:04:00 EDT
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.
Comment 5 Martin Bříza 2012-12-21 03:37:41 EST
After investigating the issue and discussion with the upstream, I'm changing the component to tcsh as it is a WONTFIX for me - the only place where this could be fixed is the shell.
For more information, see http://greenwoodsoftware.com/less/faq.html#profileout .
The description there is only related to scripts with output, but in its meaning, it extends to changing stty settings, too.
Basically, the problem is less changes the terminal features in runtime and invoking tcsh during it causes it to run all the profile scripts such as /etc/profile.d/local.csh . This is however not a standard behavior of all shells, for example bash doesn't do it at all.
Comment 6 Roman Kollár 2013-01-17 12:30:45 EST
I asked tcsh upstream about changing this behavior and got a negative response. This is a WONTFIX for tcsh.
Explanation here http://mx.gw.com/pipermail/tcsh/2013-January/004620.html.

Note You need to log in before you can comment on or make changes to this bug.