all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Alain Schneble <a.s@realize.ch>
Cc: emacs-devel@gnu.org
Subject: Re: Revise etc/DEBUG documentation
Date: Tue, 06 Sep 2016 18:16:58 +0300	[thread overview]
Message-ID: <83h99tawid.fsf@gnu.org> (raw)
In-Reply-To: <86a8fls5pb.fsf@realize.ch> (message from Alain Schneble on Tue,  6 Sep 2016 12:06:24 +0200)

> From: Alain Schneble <a.s@realize.ch>
> CC: <emacs-devel@gnu.org>
> Date: Tue, 6 Sep 2016 12:06:24 +0200
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> > Are you sure the delay is because of Emacs being parked in pselect?
> > In my testing, Emacs shuts down after C-c as soon as it gets focus.
> 
> Yes, I'm sure.  At least this is what I'm observing here (with DebPrint
> calls).  And yes, as soon as the frame gets focus or receives any other
> MS Windows message such as WM_MOUSEMOVE (or any subprocess output), it
> will terminate.  But if not, it blocks until the timeout expires.

But in that case, this is expected behavior: the SIGINT handler just
sets a flag and returns; the flag is then processed whenever the Emacs
event loop cranks one more cycle.  This is not specific to MS-Windows.
In an idle "emacs -Q", you might indeed see a difference between
Windows and Posix systems, because on the latter pselect will be
interrupted by SIGINT.  But that is not a very interesting use case
for shutting down Emacs with SIGINT.  A real-life Emacs session has
several timers running, which typically make pselect waits shorter,
and if Emacs is in the middle of some prolonged computation, you will
see a delay on Posix platforms as well.

IOW, Emacs behaves here as expected, on Windows and elsewhere.

> This potential delay is a minor detail.  But couldn't we overcome it by
> pulsing the interrupt_handle event, e.g. by a call to signal_quit in
> keyboard.c (handle_interrupt_signal), just after having set the
> Vquit_flag?  Of course, that would be for MS Windows only.

I see no reason, see above.  In any case, I'd advise against doing
anything non-trivial in the SIGINT handler, on Windows in particular,
because Windows runs such handlers in a separate thread, so it's
unsafe to do there anything non-trivial -- we could easily crash,
because we are on the wrong stack.



  reply	other threads:[~2016-09-06 15:16 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-03 10:31 Revise etc/DEBUG documentation Alain Schneble
2016-09-03 11:31 ` Eli Zaretskii
2016-09-03 13:14   ` Alain Schneble
2016-09-03 13:45     ` Noam Postavsky
2016-09-03 14:35       ` Eli Zaretskii
2016-09-03 21:56       ` Alain Schneble
2016-09-03 14:34     ` Eli Zaretskii
2016-09-03 15:05       ` Noam Postavsky
2016-09-03 15:27         ` Eli Zaretskii
2016-09-03 21:51       ` Alain Schneble
2016-09-04 14:42         ` Eli Zaretskii
2016-09-04 16:24           ` Alain Schneble
2016-09-05 16:36             ` Eli Zaretskii
2016-09-05 17:00               ` Eli Zaretskii
2016-09-05 19:19               ` Alain Schneble
2016-09-05 19:35                 ` Alain Schneble
2016-09-06  2:39                 ` Eli Zaretskii
2016-09-06 10:06                   ` Alain Schneble
2016-09-06 15:16                     ` Eli Zaretskii [this message]
2016-09-06 16:14                       ` Alain Schneble
2016-09-06 16:54                         ` Alain Schneble
2016-09-06 21:52       ` Davis Herring
2016-09-07 17:39         ` Eli Zaretskii

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=83h99tawid.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=a.s@realize.ch \
    --cc=emacs-devel@gnu.org \
    /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.