bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#17561: Emacs can forget processes


From: Andreas Schwab
Subject: bug#17561: Emacs can forget processes
Date: Thu, 29 May 2014 19:55:20 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.91 (gnu/linux)

Jorgen Schaefer <address@hidden> 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, address@hidden
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."





reply via email to

[Prev in Thread] Current Thread [Next in Thread]