View Ticket
Not logged in
Ticket UUID: b50fb21410dababca95baa122964b2e312cb9d8a
Title: exec redirection to append stdout and stderr to the same file
Type: Bug Version: 8.6.6
Submitter: pooryorick Created on: 2017-08-24 09:31:53
Subsystem: 16. Commands A-H Assigned To: nobody
Priority: 5 Medium Severity: Minor
Status: Closed Last Modified: 2017-08-29 09:25:57
Resolution: Fixed Closed By: jan.nijtmans
    Closed on: 2017-08-29 09:25:57
Description:

In the following example both stdout and stderr are redirected to append to the same file:

exec sh -c {echo hello; echo goodbye >&2; echo hello again; echo goodbye again >&2} >>output 2>>output

The file named "output" contains both "goodbye" lines, but no "hello lines".

User Comments: jan.nijtmans added on 2017-08-29 09:25:57:
Backported to core-8-6-branch as well. Thanks!

ferrieux added on 2017-08-24 16:58:00:
Fixed on trunk as http://core.tcl.tk/tcl/info/844c1fa97fb4dd24

ferrieux added on 2017-08-24 16:43:14:
Looks like commit 6c8172e1 added O_APPEND support only to ">>", overlooking "2>>". Duplicating the code.