[asterisk-bugs] [Asterisk 0013464]: asterisk console screws up terminal subtly when exited with ctrl-c with some shells

Asterisk Bug Tracker noreply at bugs.digium.com
Thu Sep 11 14:24:21 CDT 2008


A NOTE has been added to this issue. 
====================================================================== 
http://bugs.digium.com/view.php?id=13464 
====================================================================== 
Reported By:                tzafrir
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   13464
Category:                   Core/General
Reproducibility:            have not tried
Severity:                   minor
Priority:                   normal
Status:                     ready for testing
Asterisk Version:           SVN 
SVN Branch (only for SVN checkouts, not tarball releases):  trunk 
SVN Revision (number only!): 142359 
Disclaimer on File?:        N/A 
Request Review:              
====================================================================== 
Date Submitted:             2008-09-11 11:18 CDT
Last Modified:              2008-09-11 14:24 CDT
====================================================================== 
Summary:                    asterisk console screws up terminal subtly when
exited with ctrl-c with some shells
Description: 
Symptom:

# asterisk -r
[...]
wall*CLI>
*** CTRL-C pressed here ***
#
*** CTRL-D pressed here***
zsh: do you wish to see all 1670 possibilities (835 lines)? n


This seems to be triggered by the combination of zsh
and asterisk. It is cleared by issuing 'stty sane'.

I tried comparing the output of 'stty -a' at the following:

1. Clear start ("sane")
2. Starting Asterisk from zsh and pressing ctrl-C ("zshbad")
3. Starting Asterisk from bash and pressing ctrl-C ("bashbad").

No noticable differences between "sane" and "bashbad". The differences
between "sane" and "zshbad" are:

	sane	zshbad
	----    ------
eof     ^D      <undef>	
rprnt   ^R      <undef>
werase  ^W      <undef>	
lnext   ^V      <undef>
      -inlcr    inlcr
      iexten	-iexten
      echok     -echok

Tested with recent trunk (r142359) and the following shells on a Debian
Lenny system:

bash                  3.2-4
busybox-static        1:1.10.2-1
dash                  0.5.4-11
posh                  0.6.13
zsh                   4.3.6-6

posh and bash work well. zsh, dash and busybox ash mis-behave: leave
'eof' undefined. With dash and busybox ash, after pressing ctrl-C you
can no longer write to the terminal (until a 'clear' or 'stty sane')


Workaround: run 'stty sane' on the affected shells after such a ctrl-C.
====================================================================== 

---------------------------------------------------------------------- 
 (0092359) tzafrir (manager) - 2008-09-11 14:24
 http://bugs.digium.com/view.php?id=13464#c92359 
---------------------------------------------------------------------- 
Doesn't. Same as before. At least with zsh, on 1.4 r142358 . 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2008-09-11 14:24 tzafrir        Note Added: 0092359                          
======================================================================




More information about the asterisk-bugs mailing list