rpc.gssd: don't call printerr from signal handler
authorJ. Bruce Fields <bfields@redhat.com>
Mon, 6 Aug 2012 12:55:45 +0000 (08:55 -0400)
committerSteve Dickson <steved@redhat.com>
Mon, 6 Aug 2012 13:11:27 +0000 (09:11 -0400)
From: "J. Bruce Fields" <bfields@redhat.com>

printerr() isn't actually safe to call from a signal handler.  It might
be possible to make it so, but I think this is the only case in
nfs-utils where we try to, and I'm not convince it's worth it.

This fixes a bug that would eventually cause mounts to hang when gssd
is run with -vv.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Steve Dickson <steved@redhat.com>
utils/gssd/gssd_main_loop.c

index 9954ffb..6914687 100644 (file)
@@ -61,10 +61,8 @@ extern int pollsize;
 
 static volatile int dir_changed = 1;
 
-static void dir_notify_handler(int sig)
+static void dir_notify_handler(__attribute__((unused))int sig)
 {
-       printerr(2, "dir_notify_handler: sig %d\n", sig);
-
        dir_changed = 1;
 }