Subject: bug#79201: 30.1.90; set-process-thread can permanently break fd_callback_info slots

From: Eli Zaretskii <[email-masked]>
Date: Mon, 11 Aug 2025 21:52:48 +0300

> Cc: [email-masked], [email-masked], [email-masked],
>  [email-masked]
> Date: Mon, 11 Aug 2025 21:09:30 +0300
> From: Eli Zaretskii <[email-masked]>
> 
> Sorry, I cannot accept such changes without a very good reason.  This
> is not some random code or a typo, this stuff was deliberately written
> like that, and written for a reason.  If you disagree with the design,
> let's first make sure we understand the design and its rationale, and
> then please explain why the design is wrong.  It is not enough to show
> a single bug, especially if it can be fixed in other ways that don't
> remove essential parts of the design.
> 
> > This doesn't need an announcement, because the behavior of "calling
> > accept-process-output on a process locked to a different thread" still
> > works the same way it always did.  There's no (non-bug) user-visible
> > change.
> 
> Except if set-process-thread is called at some un-opportune moment.

I actually think that if there is a bug, then it's in make-process: it
should set the .thread member of the process's input and output
descriptors with the current thread, like set-process-thread does.  In
addition to cleaning up in delete_read_fd and delete_write_fd, this
should fix the problems discussed here.