realtime signals corrupted by pause() on ia64

Keith Owens kaos@ocs.com.au
Mon Feb 24 05:07:00 GMT 2003


On Mon, 24 Feb 2003 14:23:05 +1100, 
Ian Wienand <ianw@gelato.unsw.edu.au> wrote:
>On Mon, Feb 24, 2003 at 09:07:42AM +1100, Keith Owens wrote:
>> pause() incorrectly maps sigset from long
>> to words and corrupts the high order word of the mask
>
>This patch fixes it for me, but I have not tried it on x86 as I don't
>have a convenient build environment on any x86 machines.
>
>--- /home/ianw/libc/sysdeps/unix/sysv/linux/sigset-cvt-mask.h   2002-09-06 04:51:45.000000000 +1000
>+++ sysdeps/unix/sysv/linux/sigset-cvt-mask.h   2003-02-24 14:07:37.000000000 +1100
>+       int __sig;
>+       for ( __sig = 1 ; __sig < NSIG ; __sig++ ) {
>+               if ( mask & sigmask(__sig) )
>+                       if ( __sigaddset(set, __sig) < 0 )
>+                               return -1;
>+       }
>+       return 0;

What happens when NSIG > sizeof(int)*8?  Both mask and sigmask only
handle ints.



More information about the Libc-alpha mailing list