[PATCH][SAMBA3] resolve librt and libpthread signal handling config issues

James Peach jpeach at samba.org
Fri Jun 9 11:01:07 GMT 2006

Hi all,

As discussed in the thread entitled "Failed to setup RT_SIGNAL_NOTIFY
handler", linking with libpthread can cause sigaction to fail when
setting handlers for the realtime signals used for change notification
an oplocks on Linux. Unfortunately, we often pull in libpthread as a
side-effect of linking with librt, which can happen when we configure
with --with-aio-support or --with-profiling-data. See the thread
entitled "check for CLOCK_MONOTONIC" for more on this.

The attached patch implements the algorithm agreed to in the latter
thread, which goes like this:

if we have a feature that requires realtime signals
        check if each realtime signal works
        if the corresponding signal fails
                if libpthread
                        emit blame libpthread message
                        emit message
                if libpthread
                        emit libpthread warning

It turns out that the sigaction bug mentioned in the initial threade
isn't present on my test system (glibc 2.3.6), so the fine-grained
checking seems to be worthwhile.

James Peach | jpeach at samba.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: check-for-rtsignal-bug
Type: text/x-patch
Size: 5342 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20060609/acd7cfea/check-for-rtsignal-bug.bin

More information about the samba-technical mailing list