let buf = [0xFF_u8, 512];
while let Ok(n) = child.pty_mut().read(&mut buf).await { ... }
and a combination of a lot of activity in the childs pty output.
I'm not sure what the best way to solve this would be is, but perhaps clamping the internal buffers size with the capacity of the provided readbuf would potential solution?
Thanks for this crate, it's been immensely helpful!
I've been noticing panics coming from this line:
https://github.com/doy/pty-process/blob/491ad3de31067cc8cafc540cea2c8891f2985815/src/pty/tokio.rs#L49
And it looks like it occurs when the input buffer is smaller than this intermediate one here:
https://github.com/doy/pty-process/blob/491ad3de31067cc8cafc540cea2c8891f2985815/src/pty/tokio.rs#L44
I've been observing it through code like this
and a combination of a lot of activity in the childs pty output.
I'm not sure what the best way to solve this would be is, but perhaps clamping the internal buffers size with the capacity of the provided readbuf would potential solution?