+2016-01-15 Paul E. Murphy <murphyp@linux.vnet.ibm.com>
+
+ * rt/tst-mqueue5.c (thr): Cleanup misleading comment.
+ (do_child): Mask SIGRTMIN while thr is running.
+
2016-01-15 Martin Sebor <msebor@redhat.com>
[BZ #19432]
if (rtmin_cnt != 2)
{
- puts ("SIGRTMIN signal in child did not arrive");
+ puts ("SIGRTMIN signal in thread did not arrive");
result = 1;
}
else if (rtmin_pid != getppid ()
result = 1;
}
+ /* Ensure the thr thread gets the signal, not us. */
+ sigset_t set;
+ sigemptyset (&set);
+ sigaddset (&set, SIGRTMIN);
+ if (pthread_sigmask (SIG_BLOCK, &set, NULL))
+ {
+ printf ("Failed to block SIGRTMIN in child: %m\n");
+ result = 1;
+ }
+
(void) pthread_barrier_wait (b2);
/* Parent calls mqsend (q), which should wake up mqrecv (q)
result = 1;
}
- void *thr_ret;
+ /* Reenable test signals before cleaning up the thread. */
+ if (pthread_sigmask (SIG_UNBLOCK, &set, NULL))
+ {
+ printf ("Failed to unblock SIGRTMIN in child: %m\n");
+ result = 1;
+ }
+
+ void *thr_ret;
ret = pthread_join (th, &thr_ret);
if (ret)
{