summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeil Brown <neilb@suse.de>2008-11-26 08:48:03 -0500
committerSteve Dickson <steved@redhat.com>2008-11-26 08:48:03 -0500
commit068ea89e7d335d381276a2fff73d5abbb2b0a04d (patch)
tree22ebc4e2b4b6a2e7e6a7f2a842634ccb42d589b9
parentf7020bd5d3ffca280690c6beba5fecdeb4d305f7 (diff)
downloadnfs-utils-068ea89e7d335d381276a2fff73d5abbb2b0a04d.tar.gz
nfs-utils-068ea89e7d335d381276a2fff73d5abbb2b0a04d.tar.xz
nfs-utils-068ea89e7d335d381276a2fff73d5abbb2b0a04d.zip
gssd: unblock DNOTIFY_SIGNAL in case it was blocked.
I have a situation where rpc.gssd appears to not be working. Mount attempts which need to communicate with it block. I've narrowed down the problem to that fact that all realtime signals have been blocked. This means that DNOTIFY_SIGNAL (which is a realtime signal) is never delivered, so gssd never rescans the rpc_pipe/nfs directory. It seems start_kde (or whatever it is called) and all descendants have these signals blocked. xfce seems to do the same thing. gnome doesn't. So if you start rpc.gssd from a terminal window while logged in via KDE, it doesn't behave as expected. Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Steve Dickson <steved@redhat.com>
-rw-r--r--utils/gssd/gssd_main_loop.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/utils/gssd/gssd_main_loop.c b/utils/gssd/gssd_main_loop.c
index 84f04e9..b9f3a06 100644
--- a/utils/gssd/gssd_main_loop.c
+++ b/utils/gssd/gssd_main_loop.c
@@ -99,6 +99,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 +107,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));