Skip to content
Tcl Source Code View Ticket
Login

View Ticket

tty not reset on exit

Open526163ffffffffffffffffffffffffffffffffffCreated 25 years agoUpdated 25 years ago
Descriptionplain2002-03-05 22:43:04
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.
jcw Ticket [526163ffff]: 1 change [History diff]2002-03-06 05:45:24
schroedterplain2002-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.
dkfplain2002-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!
Log in (anonymous is fine) to add a comment.