Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 97fe1b239ee1e30f633ed8e58c280f2b2bd89e3a
Ticket: 439114ffffffffffffffffffffffffffffffffff
Channel buffering affects [close] status
User & Date: chris_nelson on 2001-07-06 16:52:51
Changes

  1. assignee changed to: "nobody"
  2. cmimetype changed to: "text/plain"
  3. comment changed to:
    When running a child process on a open pipe, the buffering of the channel appears to affect the 
    [catch] of the [close] of the channel on [eof].
    
    I'll attach a script which reproduce this problem.  A C program which can be used to demonstrate it 
    is:
    
      #include <stdio.h>
    
      int main(int argc,char **argv)
      {
          fprintf(stderr, "child.c   : About To Exit NonZero...\n");
          exit(33);
      }
    
    When run in Tcl 8.2, the parent process correctly gets the child's exit status.  When run in Tcl, the 
    child process appears to always succeed.
    
     urchin{53}hyper/v5.0.3/eofError > /usr/local/bin/tclsh8.2
     % source t.tcl
     % works
     child.c   : About To Exit NonZero...
     <<>>Got EOF on file3
             Set FioStatus to 1 from catch of close
             errorCode:CHILDSTATUS 9311 33
     PtiExec(FioStatus):1
     % fails
     child.c   : About To Exit NonZero...
     <<>>Got EOF on file3
             Set FioStatus to 1 from catch of close
             errorCode:CHILDSTATUS 9312 33
     PtiExec(FioStatus):1
     % urchin{54}hyper/v5.0.3/eofError > /usr/local/bin/tclsh8.4
     % source t.tcl
     % works
     child.c   : About To Exit NonZero...
     <<>>Got EOF on file3
             Set FioStatus to 1 from catch of close
             errorCode:CHILDSTATUS 9316 33
     PtiExec(FioStatus):1
     % fails
     child.c   : About To Exit NonZero...
     <<>>Got EOF on file3
            Set FioStatus to 0 from catch of close
            errorCode:CHILDSTATUS 9316 33
     PtiExec(FioStatus):0
    
    
  4. foundin changed to: "obsolete: 8.4a3"
  5. priority changed to: "5 Medium"
  6. resolution changed to: "None"
  7. status changed to: "Open"
  8. submitter changed to: "chris_nelson"
  9. subsystem changed to: "25. Channel System"
  10. title changed to: "Channel buffering affects [close] status"
  11. type changed to: "Bug"