diff mbox

[1/4] rpc.gssd: simplify signal handling

Message ID 1343768449-32205-1-git-send-email-bfields@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Bruce Fields July 31, 2012, 9 p.m. UTC
From: "J. Bruce Fields" <bfields@redhat.com>

We're not actually using the extra sa_sigaction parameters.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
---
 utils/gssd/gssd_main_loop.c |   11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

Comments

Steve Dickson Aug. 6, 2012, 2:22 p.m. UTC | #1
On 07/31/2012 05:00 PM, J. Bruce Fields wrote:
> From: "J. Bruce Fields" <bfields@redhat.com>
> 
> We're not actually using the extra sa_sigaction parameters.
> 
> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
> ---
>  utils/gssd/gssd_main_loop.c |   11 +++++------
>  1 file changed, 5 insertions(+), 6 deletions(-)
Committed...

steved.
> 
> diff --git a/utils/gssd/gssd_main_loop.c b/utils/gssd/gssd_main_loop.c
> index c18e12c..9954ffb 100644
> --- a/utils/gssd/gssd_main_loop.c
> +++ b/utils/gssd/gssd_main_loop.c
> @@ -61,9 +61,9 @@ extern int pollsize;
>  
>  static volatile int dir_changed = 1;
>  
> -static void dir_notify_handler(int sig, siginfo_t *si, void *data)
> +static void dir_notify_handler(int sig)
>  {
> -	printerr(2, "dir_notify_handler: sig %d si %p data %p\n", sig, si, data);
> +	printerr(2, "dir_notify_handler: sig %d\n", sig);
>  
>  	dir_changed = 1;
>  }
> @@ -183,13 +183,12 @@ void
>  gssd_run()
>  {
>  	int			ret;
> -	struct sigaction	dn_act;
> +	struct sigaction	dn_act = {
> +		.sa_handler = dir_notify_handler
> +	};
>  	sigset_t		set;
>  
> -	/* Taken from linux/Documentation/dnotify.txt: */
> -	dn_act.sa_sigaction = dir_notify_handler;
>  	sigemptyset(&dn_act.sa_mask);
> -	dn_act.sa_flags = SA_SIGINFO;
>  	sigaction(DNOTIFY_SIGNAL, &dn_act, NULL);
>  
>  	/* just in case the signal is blocked... */
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/utils/gssd/gssd_main_loop.c b/utils/gssd/gssd_main_loop.c
index c18e12c..9954ffb 100644
--- a/utils/gssd/gssd_main_loop.c
+++ b/utils/gssd/gssd_main_loop.c
@@ -61,9 +61,9 @@  extern int pollsize;
 
 static volatile int dir_changed = 1;
 
-static void dir_notify_handler(int sig, siginfo_t *si, void *data)
+static void dir_notify_handler(int sig)
 {
-	printerr(2, "dir_notify_handler: sig %d si %p data %p\n", sig, si, data);
+	printerr(2, "dir_notify_handler: sig %d\n", sig);
 
 	dir_changed = 1;
 }
@@ -183,13 +183,12 @@  void
 gssd_run()
 {
 	int			ret;
-	struct sigaction	dn_act;
+	struct sigaction	dn_act = {
+		.sa_handler = dir_notify_handler
+	};
 	sigset_t		set;
 
-	/* Taken from linux/Documentation/dnotify.txt: */
-	dn_act.sa_sigaction = dir_notify_handler;
 	sigemptyset(&dn_act.sa_mask);
-	dn_act.sa_flags = SA_SIGINFO;
 	sigaction(DNOTIFY_SIGNAL, &dn_act, NULL);
 
 	/* just in case the signal is blocked... */