Artifacts Associated With Ticket 218814
Ticket change [9c4f2655eb] (rid 96129) by nobody on 2000-10-26 01:05:54:
- assignee initialized to: "nobody"
- cmimetype initialized to: "text/plain"
- comment initialized to:
OriginalBugID: 2209 Bug Version: 8.1.1 SubmitDate: '1999-06-15' LastModified: '1999-07-29' Severity: CRIT Status: Released Submitter: techsupp ChangedBy: redman OS: Windows 95 Machine: X86 FixedDate: '1999-07-29' FixedInVersion: 8.2b2 ClosedDate: '2000-10-25' Name: Don Porter Comments: Has anyone else figured out a workaround for this? All my attempts so far have failed. ReproducibleScript: # FILE: demo.tcl puts stdout "msg to stdout" puts stderr "msg to stderr" ObservedBehavior: 1. Tcl 8.1.1 on Linux/Alpha $ tclsh8.1 % info patchlevel 8.1.1 % catch {exec tclsh8.1 demo.tcl} res 1 % set res msg to stdout msg to stderr % catch {exec tclsh8.1 demo.tcl > /dev/null} res 1 % set res msg to stderr % catch {exec tclsh8.1 demo.tcl >& /dev/null} res 0 Good -- that's what I want. 2. Tcl 8.0.5 on Windows95 C:\> tclsh80 % info patchlevel 8.0.5 % catch {exec tclsh80 demo.tcl} res 1 % set res msg to stdout msg to stderr % catch {exec tclsh80 demo.tcl > NUL:} res 1 % set res msg to stderr % catch {exec tclsh80 demo.tcl >& NUL:} res 0 Excellent! With proper substitutions for the names of the shell and the null device, I have cross-platform redirection to a /dev/null equivalent! Now enter the evil villain... Tcl 8.1 for Windows! 3. Tcl 8.1.1 on Windows95 % info patchlevel 8.1.1 % catch {exec tclsh81 demo.tcl} res 1 % set res msg to stdout msg to stderr % catch {exec tclsh81 demo.tcl > NUL:} res 1 % set res can not find channel named "stdout" while executing "puts stdout "msg to stdout"" (file "demo.tcl" line 2) % catch {exec tclsh81 demo.tcl >& NUL:} res 1 % set res child process exited abnormally % set errorCode CHILDSTATUS -1 1 DesiredBehavior: What happened?! I want a cross-platform way to redirect stdout/stderr of a command pipeline to (the equivalent of) /dev/null. I had it, and you took it away! Give it back, or give me another way. Allow tcl to use CHAR and UNKNOWN file types even for std channels. -- 07/29/1999 redman - foundin initialized to: "final: 8.1.1"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "69. Other"
- title initialized to: "Redirection to NUL: broken"
- type initialized to: "Bug"
Ticket change [6606aecfae] (rid 102645) by welch on 2000-10-26 08:29:16:
- closedate changed to: "2000-10-26T01:29:16"
- closer changed to: "welch"
- priority changed to: "2"
- resolution changed to: "Fixed"
- status changed to: "Closed"
Ticket change [a79639fdd3] (rid 98827) by dgp on 2001-04-23 02:42:22:
- closedate changed to: "2001-04-22T19:42:22"
- closer changed to: "dgp"
- subsystem changed to: "25. Channel System"