Re: [hackers] [st][PATCH] remove secondary call to select

From: Jeremy <jer_AT_jer.cx>
Date: Fri, 28 Jun 2024 11:36:20 -0700

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
Received on Fri Jun 28 2024 - 20:36:20 CEST

This archive was generated by hypermail 2.3.0 : Fri Jun 28 2024 - 20:36:40 CEST