Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: ab55f6f090c84ad41cfe5b5d488c4495c315427b
Ticket: 627552ffffffffffffffffffffffffffffffffff
bad pipe error message
User & Date: nobody on 2002-10-23 15:43:11
Changes

  1. assignee changed to: "dkf"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    tclpipe.c
    FileForRedirect
    
    <@ channel-without-handle
    
    
            chan = Tcl_GetChannel(interp, spec, NULL);
            if (chan == (Tcl_Channel) NULL) {
                return NULL;
            }
    file = TclpMakeFile(chan, writing ? TCL_WRITABLE :
    TCL_READABLE);
            if (file == NULL) {
                Tcl_AppendResult(interp, "channel \"",
    Tcl_GetChannelName(chan),
                        "\" wasn't opened for ",
                        ((writing) ? "writing" :
    "reading"), (char *) NULL);
                return NULL;
            }
    
    on unix  TclpMakeFile will return nil if the channel
    has no handle
    and not just bcause it wasnt readable
    leading an incorrect and very confusing error message
    
    the code should be something closer to
    
           chan = Tcl_GetChannel(interp, spec, &mode);
          if (!((writing ? TCL_WRITABLE :
    TCL_READABLE)&mood)) {
                  Tcl_AppendResult(interp, "channel \"",
    Tcl_GetChannelName(chan),
                        "\" wasn't opened for ",
                        ((writing) ? "writing" :
    "reading"), (char *) NULL);
                return NULL;
        }
    file = TclpMakeFile(chan, writing ? TCL_WRITABLE :
    TCL_READABLE);
            if (file == NULL) {
                Tcl_AppendResult(interp, "channel \"",
    Tcl_GetChannelName(chan),
                        "\"  some kind of message about
    pipe cant deal with this kind of channel", (char *) NULL);
                return NULL;
            }
    
    
  4. foundin changed to: "obsolete: 8.4.0"
  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: "18. Commands M-Z"
  10. title changed to: "bad pipe error message"
  11. type changed to: "Bug"