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

From: Roberto E. Vargas Caballero <k0ga_AT_shike2.com>
Date: Fri, 28 Jun 2024 16:34:16 +0200

Hi,

On Thu, Jun 27, 2024 at 06:51:28PM -0700, Jeremy Bobbin wrote:
> because underlying programs can request info from the tty, there was a
> potential recursion in ttyread:
> 1. ttyread
> 2. tty program wants window size
> 3. ttywrite the window size
>
> this assumes the ttyfd is both ready for read & write.
>
> if, for example, the tty wants st to report the cursor position & the
> write pipe is already cloggled, then this could cause a deadlock.
>
> this was initialy addressed with 2 selects:

Yes, this is a shame, and I began a branch many years ago to remove it.
We should have only one select because it is not so hard to get a deadlock.
I cannot give an example now, but I found different ways to do it.
Sadly, to fix this problem it is required deep changes in the code of st
(of course, my old branch dead in some old computer that I don't remembre
where it lives/deads now).

Regards,
Received on Fri Jun 28 2024 - 16:34:16 CEST

This archive was generated by hypermail 2.3.0 : Fri Jun 28 2024 - 16:36:38 CEST