From: Andreas Schwab <schwab@linux-m68k.org>
To: Jorgen Schaefer <forcer@forcix.cx>
Cc: 17561@debbugs.gnu.org, Paul Eggert <eggert@cs.ucla.edu>
Subject: bug#17561: Emacs can forget processes
Date: Thu, 29 May 2014 19:55:20 +0200 [thread overview]
Message-ID: <87a9a04ghj.fsf@igel.home> (raw)
In-Reply-To: <20140529190326.177fb39b@forcix.jorgenschaefer.de> (Jorgen Schaefer's message of "Thu, 29 May 2014 19:03:26 +0200")
Jorgen Schaefer <forcer@forcix.cx> writes:
> It works. A bit later:
>
> rt_sigprocmask(SIG_BLOCK, [CHLD], [QUIT ALRM PROF], 8) = 0
> rt_sigprocmask(SIG_SETMASK, [QUIT ALRM PROF], NULL, 8) = 0
>
> That's fine, CHLD is not masked. A while later, then, this:
>
> --- SIGIO (I/O possible) @ 0 (0) ---
> rt_sigreturn(0x1d) = 11684722
> ioctl(3, FIONREAD, [0]) = 0
> rt_sigprocmask(SIG_BLOCK, [CHLD], [QUIT ALRM CHLD PROF], 8) = 0
So the damage happend somewhere between these blocks. Please try this
patch to better see when CHLD became blocked:
diff --git a/src/sysdep.c b/src/sysdep.c
index e5b2920..35c2856 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -618,6 +618,7 @@ request_sigio (void)
{
#ifdef USABLE_SIGIO
sigset_t unblocked;
+ sigset_t oldmask;
if (noninteractive)
return;
@@ -627,7 +628,7 @@ request_sigio (void)
sigaddset (&unblocked, SIGWINCH);
# endif
sigaddset (&unblocked, SIGIO);
- pthread_sigmask (SIG_UNBLOCK, &unblocked, 0);
+ pthread_sigmask (SIG_UNBLOCK, &unblocked, &oldmask);
interrupts_deferred = 0;
#endif
@@ -638,6 +639,7 @@ unrequest_sigio (void)
{
#ifdef USABLE_SIGIO
sigset_t blocked;
+ sigset_t oldmask;
if (noninteractive)
return;
@@ -647,7 +649,7 @@ unrequest_sigio (void)
sigaddset (&blocked, SIGWINCH);
# endif
sigaddset (&blocked, SIGIO);
- pthread_sigmask (SIG_BLOCK, &blocked, 0);
+ pthread_sigmask (SIG_BLOCK, &blocked, &oldmask);
interrupts_deferred = 1;
#endif
}
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
next prev parent reply other threads:[~2014-05-29 17:55 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-23 15:52 bug#17561: 24.4.50; Emacs can forget processes Jorgen Schaefer
2014-05-23 16:28 ` bug#17561: " Paul Eggert
2014-05-23 16:44 ` Jorgen Schaefer
2014-05-24 23:01 ` Paul Eggert
2014-05-25 7:57 ` Jorgen Schaefer
2014-05-26 17:08 ` Paul Eggert
2014-05-26 18:49 ` Jorgen Schaefer
2014-05-26 23:58 ` Paul Eggert
2014-05-27 18:27 ` Jorgen Schaefer
2014-05-27 21:42 ` Paul Eggert
2014-05-27 22:16 ` Jorgen Schaefer
2014-05-28 0:47 ` Paul Eggert
2014-05-28 20:53 ` Jorgen Schaefer
2014-05-28 23:00 ` Paul Eggert
2014-05-28 23:35 ` Jorgen Schaefer
2014-05-29 1:22 ` Paul Eggert
2014-05-29 10:08 ` Jorgen Schaefer
2014-05-29 23:15 ` Paul Eggert
2014-05-29 4:17 ` Paul Eggert
2014-05-29 11:39 ` Jorgen Schaefer
2014-05-29 15:09 ` Paul Eggert
2014-05-29 15:22 ` Andreas Schwab
2014-05-29 15:26 ` Paul Eggert
2014-05-29 17:03 ` Jorgen Schaefer
2014-05-29 17:55 ` Andreas Schwab [this message]
2014-05-29 18:23 ` Jorgen Schaefer
2014-05-29 19:06 ` Jorgen Schaefer
2014-05-29 20:27 ` Andreas Schwab
2014-05-29 19:15 ` Andreas Schwab
2014-05-30 6:07 ` Paul Eggert
2014-05-30 20:41 ` Jorgen Schaefer
2014-05-30 21:29 ` Paul Eggert
2014-05-27 4:05 ` Paul Eggert
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=87a9a04ghj.fsf@igel.home \
--to=schwab@linux-m68k.org \
--cc=17561@debbugs.gnu.org \
--cc=eggert@cs.ucla.edu \
--cc=forcer@forcix.cx \
/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).