ClusterLabs/libqb — pull request #85 by r1mikey (2013-08-11 20:01:13+00:00)
Title: Use a system-supplied maximum number of signals on Mac OS X.

On Mac OS X the maximum number of signals is 31, with SIGUSR2 being number 31. Due to the loop in _adjust_sigactions_ only going up to 30, SIGUSR1 and SIGUSR2 cannot be caught and processed by libqb.

This gets change gets SIGUSR1 (#30) and SIGUSR2 (#31) working for my application.

Note that I'm using the presence of a Darwin specific define (__DARWIN_NSIG), which is always present on Darwin. As far as I know, the more general NSIG macro should be available if _POSIX_C_SOURCE (any version) is defined when libqb is compiled. This would address this issue in a completely portable fashion.