Skip to contentSkip to conversation

Bug: Blocking of RT signals in a pause()

Linux-ia64 Keith Owens 1 participant 2 messages Feb 23, 2003 – Feb 24, 2003

lore
Share & tools
lore
#0 lore raw
Quoted 5 lines · Eric Piel

Basically the problem is that while my program is in a pause() I can not receive any signal > 32 (RT signals) even if I've just unblocked them. In addition if I unblock signal 32 then all the RT signals are unblocked. This strange behaviour is not reproductible during a sleep(). No idea came to my mind to test other system calls so I can't say more.

This is a glibc bug, see http://lists.linuxia64.org/archives/linux-ia64/2003-January/004578.html.
I have sent this bug twice to the libc-alpha list, with no response.
Third bug report is on its way to libc-alpha.

#1 lore raw
Quoted 5 lines · Eric Piel

Basically the problem is that while my program is in a pause() I can not receive any signal > 32 (RT signals) even if I've just unblocked them. In addition if I unblock signal 32 then all the RT signals are unblocked. This strange behaviour is not reproductible during a sleep(). No idea came to my mind to test other system calls so I can't say more.

It looks like this has been fixed in glibc CVS 2003-02-23. The old pause file (sysdeps/unix/common/pause.c) has been deleted and sysdeps/posix/pause.c has been added, containing:

#include <signal.h>
#include <unistd.h>

/* Suspend the process until a signal arrives.
This always returns -1 and sets errno to EINTR. */
int
__libc_pause (void)
{
sigset_t set;

  __sigemptyset (&set);
  __sigprocmask (SIG_BLOCK, NULL, &set);

/* pause is a cancellation point, but so is sigsuspend.
So no need for anything special here. */

return __sigsuspend (&set);
}
weak_alias (__libc_pause, pause)

Either upgrade ia64 to glibc from CVS or modify your existing glibc to use the above code for pause.