Artifacts Associated With Ticket 219360ffffffffff
Ticket change [c68c62aee5] (rid 121789) by nobody on 2000-10-26 05:11:26:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
OriginalBugID: 5888 Bug Version: 8.3.1 SubmitDate: '2000-06-13' LastModified: '2000-10-25' Severity: MED Status: UnAssn Submitter: techsupp OS: Linux-SuSE Machine: celeron 466 128MB idedisk ..2tty FixedDate: '2000-10-25' ClosedDate: '2000-10-25' Name: Uwe Klein ReproducibleScript: tty with devicenote entry in dev but no hardware ( most installations have this ) wish % open /dev/ttyS4 {RDWR} return: file4 ObservedBehavior: throught the isatty(fd) call in tclUnixChan.c:1323 tcl determines if it is a tty or not this returns a 0 for "Inapropriate IOctrl" as well as for EIO now tcl goes happily on with a file that in its own opinion is not a tty when it actually has a tty with an error. DesiredBehavior: check for EIO, if yes close file, return an error in open!! Patch: *** tclUnixChan.c Tue Jun 13 09:49:40 2000 --- tclUnixChan.c.orig Tue Jun 13 09:55:00 2000 *************** *** 1332,1344 **** translation = "auto crlf"; channelTypePtr = &ttyChannelType; fsPtr = TtyInit(fd); - } else if ( errno == EIO ) { - close(fd); - if (interp != (Tcl_Interp *) NULL) { - Tcl_AppendResult(interp, "Error in open \"", fileName, "\": ", - Tcl_PosixError(interp), (char *) NULL); - } - return NULL; } else #endif /* SUPPORTS_TTY */ { --- 1332,1337 ---- PatchFiles: tclUnixChan.c - foundin initialized to: "obsolete: 8.3.1"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "69. Other"
- title initialized to: "open does not notice EIO in check for tty"
- type initialized to: "Bug"
Ticket change [10fef2ddd1] (rid 95068) by dkf on 2000-11-13 20:48:17:
- subsystem changed to: "62. (unused)"
Ticket change [bc48664654] (rid 101725) by dgp on 2001-04-03 06:19:52:
- subsystem changed to: "27. Channel Types"
Ticket change [10b5fe7d06] (rid 95006) by hobbs on 2001-04-03 13:41:51:
- assignee changed to: "hobbs"
Add attachment "219360.patch" [0537c96040] (rid 89018) by hobbs on 2001-09-13 02:47:39.
Ticket change [ad82480977] (rid 101477) by hobbs on 2001-09-13 02:47:39:
- icomment:
File Added - 10713: 219360.patch Logged In: YES user_id=72656 The correct patch against core-8-3-1-branch is attached. However, I want to know why open isn't returning -1, as it should, when an error should occur. We shouldn't be able to rely on errno unless open returned -1. I can't check this on Solaris because it doesn't seem to create the bogus /dev entries. Is this really a bug in Linux?
- login: "hobbs"
- mimetype: "text/plain"
- priority changed to: "4"
- username: "hobbs"
- icomment:
Ticket change [ddadec00b4] (rid 114714) by andreas_kupries on 2001-09-13 02:57:27:
- icomment:
Logged In: YES user_id=75003 Note Uwe Klein = <[email protected]>
- login: "andreas_kupries"
- mimetype: "text/plain"
- username: "andreas_kupries"
- icomment:
Ticket change [eac58b7f1c] (rid 103427) by hobbs on 2001-09-13 05:55:35:
- icomment:
Logged In: YES user_id=72656 Attached is a C file which gives more information. The interesting thing to note is that isatty is setting errno, not open (although I see nothing in the man pages about that). OK, RH 6.2 mentions nothing about errno, but other man pages indicate EBADF or ENOTTY can be returned - but not EIO. Why, even on open source OSes, do we have to rely on magic in the OS?
- login: "hobbs"
- mimetype: "text/plain"
- username: "hobbs"
- icomment:
Add attachment "219360.c" [6eea7be95f] (rid 100221) by hobbs on 2001-09-13 05:56:11.
Ticket change [d338d2c13c] (rid 123253) by hobbs on 2001-09-13 05:56:11:
- icomment:
File Added - 10724: 219360.c Logged In: YES user_id=72656 oops, forgot to attach C file...
- login: "hobbs"
- mimetype: "text/plain"
- username: "hobbs"
- icomment:
Ticket change [049c30a312] (rid 120029) by hobbs on 2003-02-19 02:34:25:
- closedate changed to: "2003-02-18T19:34:25"
- closer changed to: "hobbs"
- icomment:
Logged In: YES user_id=72656 I believe this has been corrected in updated tty checking behavior for 8.4.
- login: "hobbs"
- mimetype: "text/plain"
- resolution changed to: "Out of Date"
- status changed to: "Closed"
- username: "hobbs"