sigaction(SIGUSR1,...) fails with pthreads

Brian M. Carlson sandals at crustytoothpaste.ath.cx
Fri Nov 11 05:38:21 UTC 2005


The following three requirements (all must be present) cause signal handling 
to fail:
* sigaction;
* SIGUSR1 (I haven't tested SIGUSR2);
* pthreads.

For example (bar.c is attached):

bmc at stonewall:/tmp$ gcc -DWANT_SIGACTION -DWANT_SIGNAL bar.c
bmc at stonewall:/tmp$ ./a.out
Testing signal capabilities...
ok!
bmc at stonewall:/tmp$ gcc -DWANT_SIGACTION -DWANT_SIGNAL bar.c -lpthread
bmc at stonewall:/tmp$ ./a.out
Testing signal capabilities...
sigaction on SIGUSR1 failed!
bmc at stonewall:/tmp$ gcc -DWANT_SIGNAL bar.c -lpthread
bmc at stonewall:/tmp$ ./a.out
Testing signal capabilities...
ok!

Could someone more experienced than I look into this?  BTW, the thing that 
brought this up for me was libgc, which I am working on right now.  I think I 
have it functional, except for this problem.

BTW, this affects dovecot's auth process as well.

-- 
Brian M. Carlson <sandals at crustytoothpaste.ath.cx>
Running on GNU/kFreeBSD
Support alternative kernels in Debian!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bar.c
Type: text/x-csrc
Size: 1300 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/glibc-bsd-devel/attachments/20051111/a59c8891/bar.c


More information about the Glibc-bsd-devel mailing list