os-lib
os-lib copied to clipboard
`OutputStream.available` always retrun 0
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
@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.