Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2001-04-05
02:03 • Closed ticket [227412ffff]: fconfigure -mode doesn't appear to work in TCLPr... artifact: d8b66a73f7 user: hobbs
2001-04-03
13:29 • Ticket [227412ffff]: 1 change artifact: 3b49d8a9b4 user: hobbs
2001-03-28
08:56 • Ticket [227412ffff]: 4 changes artifact: 66dd024865 user: hobbs
2001-02-01
04:02 • Ticket [227412ffff]: 5 changes artifact: 33f0fa92ed user: dkf
2001-01-03
23:20 • Ticket [227412ffff]: 4 changes artifact: 020be3fa6c user: dkf
22:56 • Ticket [227412ffff]: 4 changes artifact: c53c58e77c user: sgalthof
15:28 • New ticket [227412ffff]. artifact: 0364ea7669 user: sgalthof

fconfigure -mode doesn't appear to work in TCLPro 1.4

Closed / Fixed227412ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 26 years ago
Descriptionplain2001-01-03 15:28:11
On 1/2/2001 I got TCLPro 1.4
I use prowish83

I enter:
set port [open /dev/ttya w+]
fconfigure $port -mode "9600,0,8,1"

In responce I get:
Error in startup script: bad option "-mode": should be one of -blocking, -buffering, -buffersize, -encoding, -eofchar, or -translation
    while executing
"fconfigure $port -mode "9600,0,8,1""
    (file "devnet" line 36)

I've seen this error before in the Bug Database, but I couldn't tell from the posts how to fix it.  The previous bug reports say this error has been fixed, but it doesn't seem to have been, in later versions of tcl.

A possible cause of the problem would be that tcl might not recognize /dev/ttya as a serial port.  Maybe open should have a flag so you can explicitly specify that a connection is a serial port or not.
sgalthofplain2001-01-03 22:56:29
I retested it with all the versions of tcl and wish provided by tclpro 1.4:
protclsh83*, tcl*, expect*, tclsh8.3*, expectk*, prowish83*, wish8.3*, and wishx*

The all failed.  I then tryed an old version of wish8.0 (8.0.3) that I had.  And when I entered:
set port [open /dev/ttya w+]
fconfigure $port -mode "9600,n,8,1"
This worked.  Note: I was missusing the parity field in my origional post, this does not invalidate the bug I'm reporting.  If I use the code that worked in 8.0.3 in any other load that I have the code doesn't work.

It seems wierd that the newer versions don't work, but the older one does.
dkfplain2001-01-03 23:20:59
Hmm.  A quick glance through the code indicates that the isatty() call (tcl/unix/tclUnixChan.c:1346) must be failing for some reason, but I've no idea why (I've no serial devices attached to this machine and messing around with my virtual terminals doesn't seem 100% wise to me...)  Oh well, perhaps this will at least make the bug easier to hunt down.
dkfplain2001-02-01 04:02:02
Could this in fact be due to the known build problem on some platforms (notably RedHat and SuSE Linuxes) where their automated build procedures result in a failure to detect what serial API is present and cause libtcl to be built without any serial support at all?
hobbsplain2001-03-28 08:56:23
Logged In: YES 
user_id=72656

My guess is that this is related to the misconfiguration on 
Linux that causes improper recognition of valid tty's.
hobbs Ticket [227412ffff]: 1 change [History diff]2001-04-03 13:29:24
hobbsplain2001-04-05 02:03:05
Logged In: YES 
user_id=72656

There was a general problem of tty detection in some linux 
builds due to configure not configuring right.  This is 
fixed by patch 402923 in 8.4a3/8.3.3.
Log in (anonymous is fine) to add a comment.