GNU bug report logs - #78946
30.1; accept-process-output not allowed in threads on macOS

Previous Next

Package: emacs;

Reported by: John Wiegley <jwiegley <at> gmail.com>

Date: Wed, 2 Jul 2025 19:21:02 UTC

Severity: normal

Found in version 30.1

Full log


Message #29 received at 78946 <at> debbugs.gnu.org (full text, mbox):

From: Alan Third <alan <at> idiocy.org>
To: Robert Pluim <rpluim <at> gmail.com>
Cc: John Wiegley <jwiegley <at> gmail.com>, Eli Zaretskii <eliz <at> gnu.org>,
 78946 <at> debbugs.gnu.org, contact <at> karthinks.com
Subject: Re: bug#78946: 30.1; accept-process-output not allowed in threads on
 macOS
Date: Fri, 4 Jul 2025 21:20:07 +0100
On Fri, Jul 04, 2025 at 01:46:19PM +0200, Robert Pluim wrote:
> >>>>> On Thu, 03 Jul 2025 16:00:23 -0700, John Wiegley <jwiegley <at> gmail.com> said:
> 
> >>>>> Robert Pluim <rpluim <at> gmail.com> writes:
>     >> John, does it help if you stick something like
> 
>     >> if ([[NSThread currentThread] isMainThread])
>     >> {
>     >> }
> 
>     >> around the
> 
>     >> [NSApp run];
> 
>     >> in `ns_select_1'?
> 
>     John> Hi Robert,
> 
>     John> With this change, I’m able to run the tests successfully 10,000 times in my
>     John> interactive Emacs on macOS.
> 
> Thatʼs encouraging. Alan, does this change make sense? (Iʼve swapped
> out what little I know about the macOS event loop 😀)

Not really... The whole thing is a mess. The return here:

  if (![NSThread isMainThread]
      || (timeout && timeout->tv_sec == 0 && timeout->tv_nsec == 0))
    thread_select (pselect, nfds, readfds, writefds,
		   exceptfds, timeout, sigmask);

Was removed and I don't think it should have been, but it was to
prevent freezes, apparently... I don't know or recall how this helped,
it looks completely wrong to me. Surely that thread_select call should
return a result?

Sorry, this hasn't been much help.
-- 
Alan Third




This bug report was last modified 30 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.