Open
Description
I wanna peek the how many bytes in OutputStream
that I can read, in case of blocked by process.
However I found when I use sub.stdout.available
, it always returns 0, seems available
didn't implemented by os.OutputStream
nor java.lang.ProcessPipeInputStream
.
Thus there might be no way to implement a non-block reading by os-lib
Metadata
Metadata
Assignees
Labels
No labels
Activity
scalway commentedon Jun 7, 2022
@sequencer you can always use
_.wrapped.available
but yea... it is long standing bug.Still...
_.available
does not guarantee anything. Spec says it is only estimation.Use unwrapped underlying subprocess input streams when pumping (#3360)