[ ghc-Bugs-811427 ] ghci messes up xterm's tty settings

2003-09-24 Thread SourceForge.net
Bugs item #811427, was opened at 2003-09-23 22:14
Message generated for change (Comment added) made by simonmar
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detailatid=108032aid=811427group_id=8032

Category: None
Group: None
Status: Closed
Resolution: Duplicate
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
Assigned to: Nobody/Anonymous (nobody)
Summary: ghci messes up xterm's tty settings

Initial Comment:
$ uname -a
SunOS syrma.ccs.neu.edu 5.9 Generic_112233-07 sun4u
sparc SUNW,Sun-Blade-100
$ echo $TERM
xterm
$ stty -a
speed 9600 baud; 
rows = 76; columns = 80; ypixels = 992; xpixels = 499;
csdata ?
eucw 1:0:0:0, scrw 1:0:0:0
intr = ^c; quit = ^\; erase = ^?; kill = ^u;
eof = ^d; eol = undef; eol2 = undef; swtch = undef;
start = ^q; stop = ^s; susp = ^z; dsusp = ^y;
rprnt = ^r; flush = ^o; werase = ^w; lnext = ^v;
parenb -parodd cs8 -cstopb hupcl cread -clocal -loblk
-crtscts -crtsxoff -parext 
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr
-igncr icrnl -iuclc 
ixon -ixany -ixoff -imaxbel 
isig icanon -xcase echo echoe echok -echonl -noflsh 
-tostop echoctl -echoprt echoke -defecho -flusho
-pendin iexten 
opost -olcuc onlcr -ocrnl -onocr -onlret -ofill -ofdel 
$ ghci   
   ___ ___ _
  / _ \ /\  /\/ __(_)
 / /_\// /_/ / /  | |  GHC Interactive, version
6.0.1, for Haskell 98.
/ /_\/ __  / /___| |  http://www.haskell.org/ghc/
\/\/ /_/\/|_|  Type :? for help.

Loading package base ... linking ... done.
Prelude :quit
Leaving GHCi.
$ stty -a
speed 9600 baud; 
rows = 76; columns = 80; ypixels = 992; xpixels = 499;
csdata ?
eucw 1:0:0:0, scrw 1:0:0:0
min = 1; time = 0;
intr = ^c; quit = ^\; erase = ^?; kill = ^u;
eof = ^a; eol = undef; eol2 = undef; swtch = undef;
start = ^q; stop = ^s; susp = ^z; dsusp = ^y;
rprnt = ^r; flush = ^o; werase = ^w; lnext = ^v;
parenb -parodd cs8 -cstopb hupcl cread -clocal -loblk
-crtscts -crtsxoff -parext 
-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr
-igncr icrnl -iuclc 
ixon -ixany -ixoff -imaxbel 
isig -icanon -xcase echo echoe echok -echonl -noflsh 
-tostop echoctl -echoprt echoke -defecho -flusho
-pendin iexten 
opost -olcuc onlcr -ocrnl -onocr -onlret -ofill -ofdel 
$ 

Note how using ghci changes the tty's value for eof and
icanon...  Changing eof in particular is annoying since
suddenly the time-honored ^d keyboard shortcut stops
working for any subsequent program I try to use in
that xterm unless I manually reset the tty's eof setting.

Philippe ([EMAIL PROTECTED])



--

Comment By: Simon Marlow (simonmar)
Date: 2003-09-24 10:35

Message:
Logged In: YES 
user_id=48280

Closed as a dup of #764685.

--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detailatid=108032aid=811427group_id=8032
___
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


[ ghc-Bugs-764685 ] GHCi breaks the terminal

2003-09-24 Thread SourceForge.net
Bugs item #764685, was opened at 2003-07-02 15:52
Message generated for change (Comment added) made by simonmar
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detailatid=108032aid=764685group_id=8032

Category: None
Group: None
Status: Closed
Resolution: Fixed
Priority: 5
Submitted By: Hampus Ram (hampusr)
Assigned to: Simon Marlow (simonmar)
Summary: GHCi breaks the terminal

Initial Comment:
After running ghci the terminal does not work exactly
as it should: Running su does no longer work for some
unknown reason (su stops after reading the first
character of the password). This happens with ghc 5.04
as well as 6.0 and current CVS-version, both in xterm
and console. This only seem to be a problem with my
Linux/Debian installation, I cannot reproduce the
problem on Solaris.

Also some minor spelling :) According to the CVS
users-guide the reverse of -frules-off is the very same
-frules-off.


--

Comment By: Simon Marlow (simonmar)
Date: 2003-09-24 10:36

Message:
Logged In: YES 
user_id=48280

Fixed, thanks.  It turns out that it is nothing to do with
readline, but indeed GHC's IO library should really be
restoring the terminal settings if it changes them.

Note that #811427 is another report of the same bug.

--

Comment By: Hampus Ram (hampusr)
Date: 2003-07-28 10:20

Message:
Logged In: YES 
user_id=159064

I performs a ioctl at the end, strace says: 

ioctl(1, SNDCTL_TMR_TIMEBASE, {B38400 opost isig icanon echo
...}) = 0

when running with input from /dev/null. This is all ok.
However when running in the terminal it says:

ioctl(1, SNDCTL_TMR_TIMEBASE, {B38400 opost isig -icanon
echo ...}) = 0

Not so good. Dpkg reports that I'm using readline 4.3-5. I'm
running bash (2.05b-7) as my primary shell but I just tried
tcsh and there it all works well!

--

Comment By: Simon Marlow (simonmar)
Date: 2003-07-28 09:20

Message:
Logged In: YES 
user_id=48280

Readline is supposed to reset the terminal.   Could you try 

 strace ghci /dev/null

and see if it attempts to reset the terminal at the end?  My 
trace has an ioctl(1, ...) near the end.

What version of readline?  Is it different from your Debian-
running friends?  What shell are you using? (some shells 
save/restore the terminal settings between running 
commands).

--

Comment By: Hampus Ram (hampusr)
Date: 2003-07-27 21:27

Message:
Logged In: YES 
user_id=159064

The (only) difference is that instead of icanon (before)
ghci leaves the terminal with -icanon (su no longer works
using line buffering, I think).

I've had this problem before with an older installation of
Debian too but no one else of my Debian-running friends seem
to have this problem.

Well, it's a minor problem but annoying.

--

Comment By: Simon Marlow (simonmar)
Date: 2003-07-22 11:27

Message:
Logged In: YES 
user_id=48280

I can't reproduce this on our boxes here.  It could be a 
readline problem.

Could you try 'stty -a' before and after running GHCi, and 
post the results?

--

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detailatid=108032aid=764685group_id=8032
___
Glasgow-haskell-bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs