about summary refs log tree commit homepage
diff options
context:
space:
mode:
-rw-r--r--lib/PublicInbox/Spawn.pm2
-rw-r--r--t/spawn.t2
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/PublicInbox/Spawn.pm b/lib/PublicInbox/Spawn.pm
index 849438bc..9c680690 100644
--- a/lib/PublicInbox/Spawn.pm
+++ b/lib/PublicInbox/Spawn.pm
@@ -401,7 +401,7 @@ sub read_out_err ($) {
                 seek($fh, 0, SEEK_SET);
                 my $dst = $opt->{$fd};
                 $dst = $opt->{$fd} = $dst->[1] if ref($dst) eq 'ARRAY';
-                PublicInbox::IO::read_all $fh, 0, $dst, length($$dst);
+                PublicInbox::IO::read_all $fh, 0, $dst
         }
 }
 
diff --git a/t/spawn.t b/t/spawn.t
index 3479b6b3..48f541b8 100644
--- a/t/spawn.t
+++ b/t/spawn.t
@@ -26,7 +26,7 @@ require PublicInbox::DS;
         is($out, 'in', 'stdin read and stdout captured');
         $opt->{0} = \"IN\n3\nLINES";
         my @out = run_qx(['sh', '-c', 'echo E >&2; cat'], undef, $opt);
-        is($e, "e\nE\n", 'captured stderr appended to string');
+        is($e, "E\n", 'captured stderr clobbers string');
         is_deeply(\@out, [ "IN\n", "3\n", 'LINES' ], 'stdout array');
 }