Tcl Source Code

View Ticket
Login
Ticket UUID: 768678
Title: open "|prog >file" throws error but still executes prog
Type: Bug Created on: 2003-07-09 19:19:06
Submitter: nobody Assigned to: andreas_kupries
Subsystem: 25. Channel System Severity:
Priority: 5 Medium Last modified: 2004-01-13 21:31:28
Status: Open Closed by:
Resolution: None Closed on:
Version: obsolete: 8.4.3
Description:
e.g.:  set pipe [open "|echo foo >bar" r]
  rightly throws an error, because stdout is redirected in
  a pipe opened for reading.
  But: by the time it complains, the pipeline has already
  been executed (with all it's sideeffects) or is still running
  in the background and no channel is assigned, so these
  processes of the pipe cannot be identified.

A solution to this would likely involve changing the 
  signature of TclCreatePipeline() (although it is 
  "unofficially exported for BLT").
   One solution could be to add an integer "flags" 
   argument, similar to  Tcl_OpenCommandChannel() 
   and pass along TCL_STDIN and/or TCL_STDOUT
   depending on whether the pipe is opened for r,w or 
   both, doing the forbid-mechanics one level deeper
   than where it is done now.
User Comments:
avl42 added on 2004-01-13 21:31:28:
Logged In: YES 
user_id=830354

Has this been forgotten?