Tcl Source Code

View Ticket
Login
Ticket UUID: 219269
Title: Wrong channel kind for stdin/out/err when pipes/sockets/seri
Type: Bug Version: obsolete: 8.0.4
Submitter: nobody Created on: 2000-10-26 05:09:40
Subsystem: 27. Channel Types Assigned To: andreas_kupries
Priority: 6 Severity:
Status: Closed Last Modified: 2001-07-13 00:18:06
Resolution: Duplicate Closed By: andreas_kupries
    Closed on: 2001-07-12 17:18:06
Description:
OriginalBugID: 1370 Bug
Version: 8.0.4
SubmitDate: '1999-03-02'
LastModified: '1999-10-29'
Severity: SER
Status: UnAssn
Submitter: pat
ChangedBy: hobbs
OS: Solaris
Machine: Other
FixedDate: '2000-10-25'
ClosedDate: '2000-10-25'


Name:
Alexandre FERRIEUX

ReproducibleScript:
fconfigure stdin
# does *not* show the proper socket options when it's a socket
# same when it's a serial device
fileevent stdin readable MyProc
# fails when it's a pipe on Windows, *even* in 8.1

ObservedBehavior:
The channel type of stdin/out/err are not computed from trhe underlying file descriptor. They are just hypothetized to be console/regular.

DesiredBehavior:
A few ioctls should be issued on stdin/out/err, and also on the result of [open] (because of [open /dev/fd/N] on Solaris and Linux, which can yield *any* descriptor), to decipher their nature, and attach whatever specific behavior would be given to their kind if created from Tcl (fconfigure options for sockets and serial; reader thread for pipes on 8.1/Windows).
User Comments: andreas_kupries added on 2001-07-13 00:18:06:
Logged In: YES 
user_id=75003

Fixed for 8.4a3. See #219137 and its duplicates.

andreas_kupries added on 2001-04-10 06:13:55:

File Added - 5172: 219146.0.diff

andreas_kupries added on 2001-04-10 06:13:54:
Logged In: YES 
user_id=75003

A first draft of a patch to fix this. In need of testcases
now.

andreas_kupries added on 2001-04-10 03:43:23:
Logged In: YES 
user_id=75003

After looking through manpages and tcl sources it seems that
most of the required capabilities are available through
"isatty" and "fstat" (+ some standardized macros).

Note that both "Tcl_MakeFileChannel" and
"TclpOpenFileChannel" have to be modified, in the same way.

andreas_kupries added on 2001-04-10 02:23:15:
Logged In: YES 
user_id=75003

See also Bug #219146. This is fixed for Win*, but not
unixoid systems.

Are the necessary ioctls portable or standardized ?

Attachments: