Skip to content
Tcl Source Code History Of Ticket 217780ffffffffff
Login

History Of Ticket 217780ffffffffff

Artifacts Associated With Ticket 217780ffffffffff

  1. Ticket change [8d261fd726] (rid 127879) by nobody on 2000-10-26 00:43:32:

    1. assignee initialized to: "nobody"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      OriginalBugID: 701 Bug
      Version: 8.0.3
      SubmitDate: '1998-10-07'
      LastModified: '1999-02-18'
      Severity: MED
      Status: Closed
      Submitter: admin
      ChangedBy: stanton
      RelatedBugIDs: 682
      OS: All Unix
      OSVersion: NA
      Machine: NA
      FixedDate: '2000-10-25'
      FixedInVersion: NA
      ClosedDate: '1999-02-18'
      
      
      This is a bug on the *unix* side for tclsh (it is still present in 8.0.3).
      
      When you do
      
              set x [exec gcc -v 2>@ stdout]
      
      you get the child's stderr into $x. (gcc -v writes to its stderr)
      
      This *is* a bug, because here "2>@ stdout" behaves exactly like "2>&1"
      in  Bourne shell;  this  is not the proper semantics for  Tcl, because
      "@stdout" should be interpreted as "tclsh's stdout" and *not* what the
      "1" file descriptor happens  to be  at that  time (within  the child),
      i.e. exec's output pipe.
      
      Another  way of  looking  at it: this  semantics  should make  the ">@
      stdout" construct equivalent to nothing. But it is not:
      
              set x [exec date >@ stdout]
      
      properly  outputs the  date  to tclsh's stdout,  and stores  the empty
      string in x.  So there seems to be a special case around 2>@stdout.
      
      Nasty, eh ?
      
       Please note that Ian Taylor's "patch" (in  your Patches page) on this
      subject,  duplicates this  *wrong*  behavior on Windows,  because  Ian
      finds it handy for his particular case... So I'm also saying that this
      patch   should   be   rejected.    (But    I   got   no   reply   from
      [email protected]).
      
       Ian and I have come to the agreement that a *feature* should be added
      instead: allowing the Bourne shell "N>&P" notation (N and  P in [0-9])
      inside  exec and open. This syntax extension  would support the wanted
      low-level descriptor semantics, hence he could write:
      
              set x [exec gcc -v 2>&1]
      
      while
      
              set x [exec gcc -v 2>@ stdout]
      
      would correctly output  the gcc  version to tclsh's stdout,  and store
      the empty string into x.
      
      -Alex
      
      
      
      
    4. foundin initialized to: "obsolete: 8.0.3"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "nobody"
    9. subsystem initialized to: "60. NRE and coroutines"
    10. title initialized to:
      uxin exec bug when redirecting stdout with "2>@ stdout"
      
    11. type initialized to: "Bug"
  2. Ticket change [f5034a644f] (rid 130028) by welch on 2000-10-26 07:49:17:

    1. closedate changed to: "2000-10-26T00:49:17"
    2. closer changed to: "welch"
    3. priority changed to: "1 Zero"
    4. resolution changed to: "Duplicate"
    5. status changed to: "Closed"
  3. Ticket change [858f8d9e56] (rid 131339) by dgp on 2001-04-05 08:20:15:

    1. closedate changed to: "2001-04-05T01:20:15"
    2. closer changed to: "dgp"
    3. subsystem changed to: "27. Channel Types"
    4. title changed to:
      uxin exec bug when redirecting stdout with "2>@ stdout"