GNU bug report logs - #54245
29.0.50; select usage in GNUstep

Previous Next

Package: emacs;

Reported by: Lars Ingebrigtsen <larsi <at> gnus.org>

Date: Fri, 4 Mar 2022 15:31:01 UTC

Severity: minor

Tags: moreinfo

Found in version 29.0.50

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Robert Pluim <rpluim <at> gmail.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 54245 <at> debbugs.gnu.org
Subject: bug#54245: 29.0.50; select usage in GNUstep
Date: Fri, 04 Mar 2022 17:15:27 +0100
>>>>> On Fri, 04 Mar 2022 16:30:38 +0100, Lars Ingebrigtsen <larsi <at> gnus.org> said:

    Lars> Paul noted in bug#32452 that:

    Lars> ---
    Lars> I notice that Emacs's GNUstep code calls 'select'. For completeness this 
    Lars> should be 'pselect' instead, so that Emacs never calls 'select'.
    Lars> ---

    Lars> So that should be fixed.  (I open a new bug report, because that bug
    Lars> report was already way too long.)

Iʼve been running with the following for a whole two days with no ill
effects (and the resulting emacs binary does not contain any calls to
'select'). Last time I looked, emacs never seems to use the sigmask
parameter to 'pselect' anyway, so itʼs kind of a moot point.

diff --git a/src/nsterm.m b/src/nsterm.m
index 670f8971df..4eb32de654 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -5830,7 +5830,7 @@ - (void)fd_handler:(id)unused
           fd_set fds;
           FD_ZERO (&fds);
           FD_SET (selfds[0], &fds);
-          result = select (selfds[0]+1, &fds, NULL, NULL, NULL);
+          result = pselect (selfds[0]+1, &fds, NULL, NULL, NULL, NULL);
           if (result > 0 && read (selfds[0], &c, 1) == 1 && c == 'g')
 	    waiting = 0;
         }

Robert
-- 




This bug report was last modified 3 years and 80 days ago.

Previous Next


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