Overview
| Artifact ID: | 9c4f2655ebd6bda5a37acf79ed4e2b5487bb89bd |
|---|---|
| Ticket: | 218814ffffffffffffffffffffffffffffffffff
Redirection to NUL: broken |
| User & Date: | nobody on 2000-10-26 01:05:54 |
Changes
- assignee changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed 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 changed to: "final: 8.1.1"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "nobody"
- subsystem changed to: "69. Other"
- title changed to: "Redirection to NUL: broken"
- type changed to: "Bug"