Bug 251866 - apparently with some perls or OSes if you read from a <FILE> in the middle of reading from a <STDIN> pipe you get corrupted file positions on STDIN. Workaround this by reading all of the STDIN pipe before processing it. r=bz

This commit is contained in:
bsmedberg%covad.net 2004-07-21 18:17:15 +00:00
Родитель 02e3ec5b9e
Коммит 25dce53454
1 изменённых файлов: 4 добавлений и 2 удалений

Просмотреть файл

@ -464,7 +464,9 @@ sub EnsureFileInDir
return 0;
}
while (<STDIN>) {
my @gLines = <STDIN>;
while (defined($_ = shift @gLines)) {
chomp;
start:
@ -474,7 +476,7 @@ start:
my $overrides = "";
my $cwd = cwd();
print "+++ making chrome $cwd => $chromeDir/$jarfile.jar\n";
while (<STDIN>) {
while (defined($_ = shift @gLines)) {
if (/^\s+([\w\d.\-\_\\\/\+]+)\s*(\([\w\d.\-\_\\\/]+\))?$\s*/) {
my $dest = $1;
my $srcPath = defined($2) ? substr($2, 1, -1) : $2;