On 06/28/24 10:52AM, Hiltjo Posthuma wrote:
> Do you perhaps also have a way to easily reproduce this deadlock condition?

I cannot reproduce the deadlock on my machine. All I want to do is
simplify ttywrite & I'm trusting that the author of 261ea4b has actually
seen this problem before.

This is the comment from 261ea4b which I believe implies a deadlock
when using st over serial:
...
 * Remember that we are using a pty, which might be a modem line.
 * Writing too much will clog the line. That's why we are doing this
 * dance.
 * FIXME: Migrate the world to Plan 9.
...

Assuming there is a deadlock when writing more than 255 bytes to a TTY
over serial, then it's straightforward to reproduce. Just paste 256
bytes in the terminal.

NRK pointed out a regression in my patch, wherein nothing garantees that
"`siz * 2` will make enough space for `n`", and this is correct, which is
why it segfaults when pasting 512+ bytes(Thanks).

I will rewrite the patch to address NRK's critique. Thank you for
your reivew, NRK.

All things considered, I am not opposed to making ttywrite do exactly
what it says. What are your thoughts on this Hiltjo, NRK, Roberto?

Jeremy

Reply via email to