|
2026-11-13
| ||
| 11:18 | • Closed ticket [666769ffff]: TIP#160: Control TTY raw/cooked mode with [fconfigur... artifact: 9db20b0b68 user: serhiy.storchaka | |
|
2009-07-13
| ||
| 19:37 | • Ticket [666769ffff]: 1 change artifact: 94c533a2d9 user: dkf | |
|
2003-10-17
| ||
| 17:47 | • Ticket [666769ffff]: 6 changes artifact: c8e13ad721 user: dkf | |
|
2003-01-17
| ||
| 23:09 | • Ticket [666769ffff]: 1 change artifact: 106dcdab14 user: dkf | |
|
2003-01-16
| ||
| 13:54 | • Ticket [666769ffff]: 4 changes artifact: 84c7745ed6 user: nobody | |
| 13:03 | • Open ticket [666769ffff]. artifact: 592fa5381b user: dkf | |
|
2003-01-14
| ||
| 05:17 | • Pending ticket [666769ffff]. artifact: ca5d88856d user: hobbs | |
| 05:12 | • Ticket [666769ffff]: 6 changes artifact: ecc7143da0 user: vincentdarley | |
|
2003-01-12
| ||
| 19:48 | • New ticket [666769ffff]. artifact: a16ec016e4 user: gwlester | |
TIP#160: Control TTY raw/cooked mode with [fconfigure]
Closed / Fixed666769ffffffffffffffffffffffffffffffffffCreated 24 years agoUpdated 20 days ago
Descriptionplain2003-01-12 19:48:27
Configuring stdin to buffering none has no effect.
For example, run the following program. Typing an "X" should cause it to complete, however a "X<CR>"
must be typed. This is true under both Linux and Windows NT.
fconfigure stdin -blocking yes -buffering none -translation {binary binary}
puts [fconfigure stdin]
set ch [read stdin 1]
puts stdout "\n\tYou typed a '$ch'"
flush stdout
vincentdarleyplain2003-01-14 05:12:56
Logged In: YES user_id=32170 Not a filesystem problem, but a channel system one I assume.
hobbsplain2003-01-14 05:17:53
Logged In: YES user_id=72656 I do not believe this is a Tcl problem at all, but rather the fact that you can't control a tty in this way. On unix you would have to call stty with special settings, or use Expect. There are examples of this on the net.
dkfplain2003-01-16 13:03:50
Logged In: YES user_id=79902 On any UNIX platform, this will only work if you change the channel driver from its default "cooked" mode to "raw". The cooked mode allows for basic line editing in simple apps (like cat!) so it is a good thing, but for some cases that's not sufficient. Tcl does not currently support changing the TTY mode this way, though I would personally be very sympathetic to anyone who wants to add the feature. I presume Windows has something similar, though I don't know the platform nearly well enough to be able to sensibly comment. Transforming this to a FRQ
nobodyplain2003-01-16 13:54:12
Logged In: NO Based on Don's and Jeff's comments, this should at least be changed to a documentation bug. In other words, the documentation should explictly state that stdin/stdout/stderr are not effect by certain aspects of fconfigure. If this is also true of other ttys, it should also be explictity stated.
dkf Ticket [666769ffff]: 1 change
[History diff]2003-01-17 23:09:48
dkfplain2003-10-17 17:47:55
Logged In: YES user_id=79902 See TIP#160 http://purl.org/tcl/tip/160
dkf Ticket [666769ffff]: 1 change
[History diff]2009-07-13 19:37:45
serhiy.storchakawiki2026-11-13 11:18:45
Implemented in Tcl 9.0 by TIP 160: fconfigure stdin -inputmode raw (and normal, password, reset) switches the terminal mode of serial channels on Unix and of console channels on Windows.
Log in (anonymous is fine) to add a comment.