Bug#627025: perl: data loss in output when both stdout and stderr are redirected to a pipe
Vincent Lefevre
vincent at vinc17.net
Tue May 17 12:52:58 UTC 2011
On 2011-05-17 12:43:20 +0100, Dominic Hargreaves wrote:
> Thanks for letting us know. My next question (not yet having had
> time to do any detailed analysis of the issue) would be whether it
> can be reproduced on squeeze (or even better, pre-5.12 sid/wheezy,
> but that's probably rather awkward to set up now).
It seems that the problem doesn't occur when one uses the "file:"
scheme, but it occurs when one uses the "svn+ssh:" scheme. I don't
know whether this is related to the timing ("file:" is probably too
fast) or something else.
So, do not take into account my remark on Debian/lenny, as I was
using the "file:" scheme. I can reproduce the bug on it too.
Here's the script (called bigrep):
------------------------------------------------------------
#!/bin/sh
set -e
rm -rf bigrep-repos bigrep-wc
svnadmin create bigrep-repos
svn co svn+ssh://localhost`pwd`/bigrep-repos bigrep-wc
cd bigrep-wc
for i in `seq 1 10`
do
touch file$i
svn add file$i
seq 1 3000 > log
svn ci -F log
done
svn update
------------------------------------------------------------
Running "./svn2log bigrep-wc 2>&1 | less -M" often gives after
typing the End key:
[...]
2990
2991
2992
29
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
lines 14957-15015/15015 (END)
Also:
tomate% ./svn2log bigrep-wc 2>&1 | wc
26521 26553 123083
tomate% ./svn2log bigrep-wc 2>&1 | wc
25701 25733 118987
tomate% ./svn2log bigrep-wc 2>&1 | wc
25702 25734 118987
tomate% ./svn2log bigrep-wc 2>&1 | wc
30012 30046 139467
tomate% ./svn2log bigrep-wc 2>&1 | wc
30012 30046 139467
tomate% ./svn2log bigrep-wc 2>&1 | wc
26521 26553 123083
--
Vincent Lefèvre <vincent at vinc17.net> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)
More information about the Perl-maintainers
mailing list