Kristýna Streitová <[email protected]> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
>
> I would like to ask you what is the desired behaviour of output
> streams in this case:
>
>
> star -f /dev/null -multivol -C / -cv /usr/share/doc 2>&1 | tee output.log
>
>
> If you try this command, you can see that the verbose output is mixed
> with the error output at the end of the run (see the end of the
> output.log file from openSUSE 13.2 [1]).
>
> I would like to ask you if there is any chance that it's intended to
> separate these outputs?
>
>
> Why I'm asking: There was a bug in star which had a side effect
> causing these outputs to be ordered correctly. After star was patched
> the outputs are mixed. We found out about the different star behaviour
> thanks to regression tests that tested star before and after this patch.
You requested this behavior:
- stdout is line buffered when connected to a TTY and block buffered
in any other case.
- stderr is always line buffered
By using: "2>&1", you connected stdout and stderr to the same FD outside of
star, but star cannot know this.
By piping the resulting stream, you requested stdout to become block buffered
and this holds content back until star exits or a full block was filled up. The
line buffered error messages seem to come before the last partial buffer for
stdout was emptied and this causes the mix.
Jörg
--
EMail:[email protected] (home) Jörg Schilling D-13353 Berlin
[email protected] (work) Blog:
http://schily.blogspot.com/
URL: http://cdrecord.org/private/
http://sourceforge.net/projects/schilytools/files/'
------------------------------------------------------------------------------
_______________________________________________
S-tar-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/s-tar-developers