Re: Separating stdout and stderr

Christophe Lyon <[email protected]>
Newsgroups gmane.comp.sysutils.dejagnu.general
Message-ID <CAKdteOaV76oK6YoJpo_XwEQb65SnEF2yLx=1jf0sEUhd4cTvDA@mail.gmail.com>
On 31 March 2016 at 12:03, Ben Elliston <[email protected]> wrote:
> On Thu, Mar 31, 2016 at 11:11:14AM +0200, Christophe Lyon wrote:
>
>> It seems that the remote stdout/stderr are merged by tcl, rather
>> than dejagnu, since replacing "|&cat" in dejagnu with "2>/dev/null"
>> does not discard the remote stderr contents.
>
> BTW, I just confirmed through careful reading of the Tcl exec man page
> that: "If any of the commands writes to its standard error file and
> that standard error is not redirected and -ignorestderr is not
> specified, then exec will return an error; the error message will
> include the pipeline's standard output, followed by messages about
> abnormal terminations (if any), followed by the standard error
> output."
>
> So standard error always follows standard output for Tcl exec. It's
> not interleaved.
>

Thanks for finding this bit of info! That's very useful indeed.

But since we currently have "|&cat", we do redirect stderr,
so the "and that standard error is not redirected" claude
above is not fulfilled. Do you know what happens in this case?


> Ben
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.