-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Thank you for your explanation. So if I understand it correctly then
the mixed outputs are an expected star behaviour when you are using
'2>&1'a and piping.

Best regards,
Kristyna Streitova


Dne 2.11.2015 v 13:21 Joerg Schilling napsal(a):
> 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
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBAgAGBQJWRednAAoJEPox3pw+dmQGgKMP/i776rYqoOhSIjlu9AnLbwY3
t9xJqst/Pc6NeIUoODwKMnSS0t5jqig1tU1x3GZxKA/NSqBuqbj3ZJYw0REnnC2X
vwUAgTRHV+B1lGkXzY0uqgkw4KIX7DaOAYh2+wAlLwypakhtDYLryhCKZoIJFwgx
BkPOs9vzm0twRLGlPHDUVATopGdVcMkBUkN6+G0jjqn3Rv13wOYvwUuIzS2iMHGW
UK/X1Ljq9GM2Mjm7a9E8IuzdAuUVScrechCEWpIaVDgw+ADMQKM+ctmoWidgX8Mz
NuZBGB1g3PfsfVpvR7/mLaFSrQa+/c4JeWC88S7x6Cdbkbpby8lQwVHdxV/fqgKj
nEfavZMwiA+UVR8r0LGuRuhWi5fP/pXunAwutoMbbmqrM6wSYDn/nXXSVPQQl0Ry
oqs3atWy/pCzGywMwHZRtzdM/S5fn+HEGx6JeDr3mLq/aMTPJF0mBlDwHVuKTosJ
sZtdRNptiwPZ0uMRfz0GE8OXUdbsh68u0N5XXCWYOk1hTPn6qHM3Dc8jxLNP4fXJ
/8gGeyk+1aH8gBQHnUS0eQurfsdSjgI9BCMZPXCpvbYmVOrnVFnBJqZVoBs0Lds4
Y9Jga32MDR0wv94HbVfF7mQNNegGRzxTnXwH+FsW4+lSP4Tk3lt3NwfxQr1sCTTJ
Jcwxkufnme9WXaHn4Pia
=rQFR
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
_______________________________________________
S-tar-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/s-tar-developers

Reply via email to