]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
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 9954ffb0c2a3f3c2c9ecd0158001cd4c809ade02..6914687344028214d3bbf2e4c4c3676622e68eae 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;
 }