Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: c68c62aee55e61aa9d60dbaec37882226b4cee05
Ticket: 219360ffffffffffffffffffffffffffffffffff
open does not notice EIO in check for tty
User & Date: nobody on 2000-10-26 05:11:26
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed 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
    
    
    
    
    
    
  4. foundin changed to: "obsolete: 8.3.1"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "nobody"
  9. subsystem changed to: "69. Other"
  10. title changed to: "open does not notice EIO in check for tty"
  11. type changed to: "Bug"