Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2006-03-25
10:22 • Closed ticket [219161ffff]: Merging stdout and stderr plus 6 other changes artifact: c7efcbf9ce user: sf-robot
2006-03-10
23:07 • Pending ticket [219161ffff]. artifact: b63bc0ce5b user: dgp
2002-10-16
00:11 • Ticket [219161ffff]: 4 changes artifact: 06f613beca user: craighandler
2002-07-06
03:58 • Ticket [219161ffff]: 4 changes artifact: ffaf59757b user: dgp
2001-09-08
06:07 • Ticket [219161ffff]: 1 change artifact: 29bd8da243 user: andreas_kupries
2001-04-05
08:20 • Ticket [219161ffff]: 1 change artifact: 9b03411615 user: dgp
2000-10-26
05:02 • New ticket [219161ffff]. artifact: 74e40af66a user: nobody

Merging stdout and stderr

Closed / Fixed219161ffffffffffffffffffffffffffffffffffCreated 26 years agoUpdated 21 years ago
Descriptionplain2000-10-26 05:02:30
OriginalBugID: 1470 RFE
Version: 8.0.4
SubmitDate: '1999-03-08'
LastModified: '2000-04-26'
Severity: SER
Status: Assigned
Submitter: pat
ChangedBy: hobbs
RelatedBugIDs: 682 582
OS: All
FixedDate: '2000-10-25'
FixedInVersion: NA
ClosedDate: '2000-10-25'


Name:  Alexandre FERRIEUX

DesiredBehavior:
It is well known that it's not trivial to merge the stdout and stderr of
a child on Windows. The Debated patch by Ian Taylor dragged the existing
>@ redirection semantics the wring way (i.e. patching WIndows to mimic
UNIX, while for once the UNIX behavior is wrong !!!). Suggestions have
been made to use "2>&1" instead, which at least doesn't violate the rest
of the >@ semantics. The problem with this is that it's a Bourne
shell-based notation, while the rest of [exec/open] uses a csh-notation.
In particular , ">&" already exists, which would make "2>&1" at least
ambiguous.
    
Hence, I suggest a syntax extension that is more in the spirit of the
existing notation, while protecting the semantics: ">&@outpipe".
Explanation: ">&@x" already exists, meaning "redirect both stdout and
err to the previously opened descriptor found at the low level of the
Tcl channel 'x'.
Notice that Ian Taylor's patch for Windows and the current (buggy)
semantics for Unix both propose to use "stdout" here as "x". Instead, I
propose to use a new string "outpipe", which would be recognized
internally as 'the output pipe being created'.


See 682 for longer explanation of odd behavior.  582 is the "incorrect"
patch that Ian Taylor proposed. 
-- 04/26/2000 hobbs
dgp Ticket [219161ffff]: 1 change [History diff]2001-04-05 08:20:12
andreas_kupries Ticket [219161ffff]: 1 change [History diff]2001-09-08 06:07:14
dgpplain2002-07-06 03:58:35
Logged In: YES 
user_id=80530

This appears to be more FR than Bug.
craighandlerplain2002-10-16 00:11:10
Logged In: YES 
user_id=629134

Of course, the difference in behavior Unix v. Windows also 
occurs with [open "| foo 2>@stdout"].  For this case, at least, 
the problem could be resolved by supporting "|&" at the head 
of a new pipeline.  This is an already supported syntax in the 
middle of pipelines, just not at the head of one.  So, this 
should not be objectionable the way 2>&1 seems to be.

Of course, it does nothing to resolve the problem for [exec].
dgpplain2006-03-10 23:07:53
Logged In: YES 
user_id=80530


Didn't TIP 202 resolve this?
sf-robotplain2006-03-25 10:22:12
Logged In: YES 
user_id=1312539

This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).
Log in (anonymous is fine) to add a comment.