unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Ken Brown <kbrown@cornell.edu>
To: 51820@debbugs.gnu.org
Cc: Paul Eggert <eggert@cs.ucla.edu>
Subject: bug#51820: 29.0.50; process_pending_signals is almost useless without SIGIO
Date: Sat, 13 Nov 2021 17:49:59 -0500	[thread overview]
Message-ID: <f31e1b27-8a13-22c6-d6aa-b35e504e1338@cornell.edu> (raw)

I might be missing something, but it seems to me that the main purpose of 
process_pending_signals is to read input in case the user typed C-g.  This is in 
fact done on systems with SIGIO, via a call to handle_async_input.  But 
handle_async_input is a NOOP on systems without SIGIO.  This has been the case 
since the following commit:

commit 4d7e6e51dd4acecff466a28d958c50f34fc130b8
Author: Paul Eggert <eggert@cs.ucla.edu>
Date:   Sun Sep 23 01:44:20 2012 -0700

     Simplify and avoid signal-handling races.
[...]
     Fixes: debbugs:12471

I can't find anything in the commit message or in the discussion of Bug#12471 
that explains this.  Paul, I realize that the commit was 9 years ago, but do you 
remember why you made this change?

On systems without SIGIO, an atimer "poll_timer" is created that fires every 2 
seconds.  This causes pending_signals to be set, which has practically no effect 
AFAICT.  The only thing I see that poll_timer accomplishes is that if emacs 
happens to be in the select call in wait_reading_process_output when the timer 
fires, then select will return.

Ken





             reply	other threads:[~2021-11-13 22:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-13 22:49 Ken Brown [this message]
2021-11-13 23:12 ` bug#51820: 29.0.50; process_pending_signals is almost useless without SIGIO Paul Eggert
2021-11-13 23:17   ` Ken Brown
2021-11-13 23:18     ` Paul Eggert
2021-11-13 23:25       ` Ken Brown
2021-11-14  2:26         ` Lars Ingebrigtsen
2021-11-14 16:09           ` Ken Brown
2021-11-14  6:47         ` Eli Zaretskii
2021-11-17 18:11           ` Ken Brown

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f31e1b27-8a13-22c6-d6aa-b35e504e1338@cornell.edu \
    --to=kbrown@cornell.edu \
    --cc=51820@debbugs.gnu.org \
    --cc=eggert@cs.ucla.edu \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).