X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=utils%2Fgssd%2Fgssd_main_loop.c;h=917b66221bfd536419146f1881b293a2831bf406;hb=6b7ad21f8162ec85766fd1369ea13ab432e287f8;hp=84f04e96eda218cc236e835067b8e0728f27191c;hpb=ca5f2d1e16a6451c1df203bccfd8944ee84c728f;p=nfs-utils.git diff --git a/utils/gssd/gssd_main_loop.c b/utils/gssd/gssd_main_loop.c index 84f04e9..917b662 100644 --- a/utils/gssd/gssd_main_loop.c +++ b/utils/gssd/gssd_main_loop.c @@ -28,9 +28,14 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +#ifdef HAVE_CONFIG_H +#include +#endif /* HAVE_CONFIG_H */ + #ifndef _GNU_SOURCE #define _GNU_SOURCE #endif + #include #include #include @@ -99,6 +104,7 @@ gssd_run() int ret; struct sigaction dn_act; int fd; + sigset_t set; /* Taken from linux/Documentation/dnotify.txt: */ dn_act.sa_sigaction = dir_notify_handler; @@ -106,6 +112,11 @@ gssd_run() dn_act.sa_flags = SA_SIGINFO; sigaction(DNOTIFY_SIGNAL, &dn_act, NULL); + /* just in case the signal is blocked... */ + sigemptyset(&set); + sigaddset(&set, DNOTIFY_SIGNAL); + sigprocmask(SIG_UNBLOCK, &set, NULL); + if ((fd = open(pipefs_nfsdir, O_RDONLY)) == -1) { printerr(0, "ERROR: failed to open %s: %s\n", pipefs_nfsdir, strerror(errno));