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,

Reply via email to