Subject: Re: 30.1.90; set-process-thread can permanently break fd_callback_info slots

From: "John Wiegley" <[email-masked]>
Date: Fri, 08 Aug 2025 11:22:23 -0700

>>>>> Spencer Baugh <[email-masked]> writes:

> (while (null (accept-process-output proc2)))

Based on the what the manual says, shouldn’t this be?

    (while (accept-process-output proc2))

> Anyway, probably we should be setting fd_callback_info[fd].thread to
> NULL also when the process exits.  But, I suggest we should further also
> set it to NULL (and also waiting_thread) when we start using a
> fd_callback_info[fd] slot, e.g. in add_read_fd.  That avoids the
> possibility of permanent contamination of fd_callback_info slots, which
> I think is possible in some other ways, though I haven't been able to
> reproduce it yet...

This sounds like an important fix to me. I haven’t run into this problem yet
myself, but the logic above tracks.

-- 
John Wiegley                  GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com                          60E1 46C4 BD1A 7AC1 4BA2