Skip to content

Commit f64a41f

Browse files
authored
LLLeap: handle partial lines in stderr (#4678)
1 parent 3b3c85d commit f64a41f

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

indra/llcommon/llleap.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,17 @@ class LLLeapImpl: public LLLeap
188188
<< childout.peek(0, peeklen) << "..." << LL_ENDL;
189189
}
190190

191+
// Handle any remaining stderr data (partial lines) the same way as we do
192+
// for stdout: log it.
193+
LLProcess::ReadPipe& childerr(mChild->getReadPipe(LLProcess::STDERR));
194+
if (childerr.size())
195+
{
196+
LLProcess::ReadPipe::size_type
197+
peeklen((std::min)(LLProcess::ReadPipe::size_type(50), childerr.size()));
198+
LL_WARNS("LLLeap") << "Final stderr " << childerr.size() << " bytes: "
199+
<< childerr.peek(0, peeklen) << "..." << LL_ENDL;
200+
}
201+
191202
// Kill this instance. MUST BE LAST before return!
192203
delete this;
193204
return false;

0 commit comments

Comments
 (0)