From: Po Lu via "Bug reports for GNU Emacs, the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
To: Robert Pluim <rpluim@gmail.com>
Cc: Lars Ingebrigtsen <larsi@gnus.org>, 54245@debbugs.gnu.org
Subject: bug#54245: 29.0.50; select usage in GNUstep
Date: Sat, 05 Mar 2022 08:45:03 +0800 [thread overview]
Message-ID: <87bkylqlbk.fsf@yahoo.com> (raw)
In-Reply-To: <87r17hhexs.fsf@gmail.com> (Robert Pluim's message of "Fri, 04 Mar 2022 17:15:27 +0100")
Robert Pluim <rpluim@gmail.com> writes:
> 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
That LGTM, but I only tested on GNUstep. The same code is also used on
macOS, so there might be some side effects.
Though the NS port is very old and I get the feeling that we keep
bumping into relics from over two decades ago, and using `select' might
very well be one of those.
Thanks.
next prev parent reply other threads:[~2022-03-05 0:45 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-04 15:30 bug#54245: 29.0.50; select usage in GNUstep Lars Ingebrigtsen
2022-03-04 16:10 ` Lars Ingebrigtsen
2022-03-04 16:15 ` Robert Pluim
2022-03-05 0:45 ` Po Lu via Bug reports for GNU Emacs, the Swiss army knife of text editors [this message]
2022-03-05 11:32 ` Robert Pluim
2022-03-05 19:00 ` Lars Ingebrigtsen
2022-03-14 9:22 ` Robert Pluim
2022-03-14 9:30 ` Po Lu
2022-03-14 13:12 ` Eli Zaretskii
2022-03-14 9:31 ` Lars Ingebrigtsen
2022-03-14 13:10 ` Eli Zaretskii
2022-03-14 13:20 ` Stefan Monnier
2022-03-14 13:48 ` Eli Zaretskii
2022-03-14 13:34 ` Po Lu
2022-03-14 13:59 ` Eli Zaretskii
2022-03-14 13:43 ` Robert Pluim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87bkylqlbk.fsf@yahoo.com \
--to=bug-gnu-emacs@gnu.org \
--cc=54245@debbugs.gnu.org \
--cc=larsi@gnus.org \
--cc=luangruo@yahoo.com \
--cc=rpluim@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.