unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Barry OReilly <gundaetiapo@gmail.com>
To: 15561@debbugs.gnu.org
Subject: bug#15561: Timer can miss its SIGALRM
Date: Tue, 8 Oct 2013 10:20:47 -0400	[thread overview]
Message-ID: <CAFM41H3u1YQTgWpRGteu+ZQ_g0GUjEdYLjPT2D3VdpZJmo3wEw@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 577 bytes --]

Looking over the timer code, the do_pending_atimers function does:

      block_atimers ();
      run_timers ();
      unblock_atimers ();

The last line of run_timers is:

  set_alarm ();

But what happens if the next timer happens to be soon, and Emacs
receives SIGALRM inbetween set_alarm and unblock_timers?

What is the purpose of sigmasking SIGALRM anyway? If it means to block
SIGALRM during timers, that doesn't always happen because timers run
within timers. The end of an inner timer would unblock SIGALRM and
the outer timer would finish with the sigmask unblocked.

[-- Attachment #2: Type: text/html, Size: 663 bytes --]

             reply	other threads:[~2013-10-08 14:20 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-08 14:20 Barry OReilly [this message]
2014-02-28 14:43 ` bug#15561: periodic timer stops running Barry OReilly
2014-02-28 14:50   ` Barry OReilly
2014-03-02 15:58   ` Peter Münster
2014-03-04  4:17     ` Barry OReilly
2014-03-04  9:11 ` Peter Münster
2014-03-05 17:13   ` Peter Münster
2014-03-12 21:52   ` Barry OReilly
2014-03-25  8:59 ` Peter Münster
2014-03-25 13:18   ` Barry OReilly
2014-03-25 14:45     ` Paul Eggert
2014-04-24  5:29 ` Peter Münster

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=CAFM41H3u1YQTgWpRGteu+ZQ_g0GUjEdYLjPT2D3VdpZJmo3wEw@mail.gmail.com \
    --to=gundaetiapo@gmail.com \
    --cc=15561@debbugs.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 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).