Linux NFS development
 help / color / mirror / Atom feed
From: Steve Dickson <SteveD@redhat.com>
To: Linux NFS Mailing list <linux-nfs@vger.kernel.org>
Subject: [PATCH] sm-notify: always exiting without any notification
Date: Sat, 06 Dec 2008 08:44:02 -0500	[thread overview]
Message-ID: <493A81A2.5050904@RedHat.com> (raw)

In my recent trials and tribulations on dealing with
the state file I found this fairly obvious bug:

commit 5d8b800b8438222a55c4698c86b558b15717aa21
Author: Steve Dickson <steved@redhat.com>
Date:   Sat Dec 6 08:31:29 2008 -0500

    sm-notify: always exiting without any notification
    
    Added curly brackets around the record_pid() check which
    stops sm-notify from exiting when a pid file does not
    exist.
    
    Signed-off-by: Steve Dickson <steved@redhat.com>

diff --git a/utils/statd/sm-notify.c b/utils/statd/sm-notify.c
index 7a7ae1a..d8e2c01 100644
--- a/utils/statd/sm-notify.c
+++ b/utils/statd/sm-notify.c
@@ -193,10 +193,11 @@ usage:		fprintf(stderr,
 	openlog("sm-notify", LOG_PID, LOG_DAEMON);
 
 	if (strcmp(_SM_BASE_PATH, BASEDIR) == 0) {
-		if (record_pid() == 0 && force == 0 && opt_update_state == 1)
+		if (record_pid() == 0 && force == 0 && opt_update_state == 1) {
 			/* already run, don't try again */
 			nsm_log(LOG_NOTICE, "Already notifying clients; Exiting!");
 			exit(0);
+		}
 	}
 
 	if (opt_srcaddr) {

             reply	other threads:[~2008-12-06 13:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-06 13:44 Steve Dickson [this message]
     [not found] ` <493A81A2.5050904-AfCzQyP5zfLQT0dZR+AlfA@public.gmane.org>
2008-12-08 23:34   ` [PATCH] sm-notify: always exiting without any notification J. Bruce Fields
2008-12-09  0:35     ` Steve Dickson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=493A81A2.5050904@RedHat.com \
    --to=steved@redhat.com \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox