Tcl Source Code

View Ticket
Login
Ticket UUID: 526163
Title: tty not reset on exit
Type: Bug Created on: 2002-03-05 22:43:04
Submitter: jcw Assigned to: schroedter
Subsystem: 25. Channel System Severity:
Priority: 5 Medium Last modified: 2002-03-06 20:20:38
Status: Open Closed by:
Resolution: None Closed on:
Version: obsolete: 8.4a4
Description:
Followup of bug #525783

Running cvs HEAD, ttyCloseProc has SETIOSTATE #if'ed
out - I get a problem on exit:

- running on SuSE 7.3 KDE, konsole, tty /dev/pts/5
- start ./tclsh
- enter "open /dev/pts/5; exit"
- tclsh exits, but leaves terminal in bad state

It looks like it's in non-blocking mode still.
Normal state is restored by typing "stty sane <CR>"

When restoring #if 0 to #if 1, and the ttyPtr def at
top, as suggested by Jeff Hobbs in the chat, the above
works as expected again.

Redoing this all with vanilla 8.3.3 tclsh in SuSE, the
exit behavior is ok.
User Comments:
schroedter added on 2002-03-06 20:04:31:
Logged In: YES 
user_id=99573

Yes, this is a change introduced (and accepted) with TIP#35 
      http://tcl.activestate.com/cgi-bin/tct/tip/35.html
It was a request by some folks not to restore serial port settings at TCL exit, so that TCL may be used as a 
simpler stty.

When implementing TIP#35 I wasn't sure about possible side effects, so I did not remove the code 
physically but put it into #if 0 ... #endif.

I have no problems with and without restoring serial port settings.
IMO this does not impact other TIP#35 enhancements.

dkf added on 2002-03-06 20:20:38:
Logged In: YES 
user_id=79902

Some situations need one behaviour and others need the
other?  Can't choose what the right behaviour is?  Sounds
like a job for [fconfigure] to me!