Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: e2f10787cffab0d44583e95aa2b96255a2adaabd
Ticket: 419685ffffffffffffffffffffffffffffffffff
Problem with [file channels] if std channels not available
User & Date: hobbs on 2001-05-22 08:57:09
Changes

  1. icomment:
    Logged In: YES 
    user_id=72656
    
    It is a standard convention that when the std channels are 
    closed, the next following channels to be opened will be 
    assumed as new std channels.
    
    The question here is really whether we are correctly 
    handling the std channels when they aren't initially 
    opened.  I believe this would also affect Tcl when run as a 
    unix daemon in certain cases, and the logic should be 
    checked there.
    
    I guess it is plausible to argue that the behavior is still 
    correct, and the docs need updating with "or the std 
    channels were unable to be created at startup".  However, I 
    can see the aliasing behavior to be very disconcerting.  My 
    initial suggestion is that the valid way to work this would 
    be:
    
    if {[llength [file channels std*]] != 3} {
    # create bogus channels to add up to 3
    }
    
    
  2. login: "hobbs"
  3. mimetype: "text/plain"
  4. username: "hobbs"