* [PATCH] sm-notify: always exiting without any notification
@ 2008-12-06 13:44 Steve Dickson
[not found] ` <493A81A2.5050904-AfCzQyP5zfLQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Steve Dickson @ 2008-12-06 13:44 UTC (permalink / raw)
To: Linux NFS Mailing list
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) {
^ permalink raw reply related [flat|nested] 3+ messages in thread[parent not found: <493A81A2.5050904-AfCzQyP5zfLQT0dZR+AlfA@public.gmane.org>]
* Re: [PATCH] sm-notify: always exiting without any notification [not found] ` <493A81A2.5050904-AfCzQyP5zfLQT0dZR+AlfA@public.gmane.org> @ 2008-12-08 23:34 ` J. Bruce Fields 2008-12-09 0:35 ` Steve Dickson 0 siblings, 1 reply; 3+ messages in thread From: J. Bruce Fields @ 2008-12-08 23:34 UTC (permalink / raw) To: Steve Dickson; +Cc: Linux NFS Mailing list On Sat, Dec 06, 2008 at 08:44:02AM -0500, Steve Dickson wrote: > In my recent trials and tribulations on dealing with > the state file I found this fairly obvious bug: Yipes. This code needs all the eyes it can get, I guess. --b. > > 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) { > -- > 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 ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] sm-notify: always exiting without any notification 2008-12-08 23:34 ` J. Bruce Fields @ 2008-12-09 0:35 ` Steve Dickson 0 siblings, 0 replies; 3+ messages in thread From: Steve Dickson @ 2008-12-09 0:35 UTC (permalink / raw) To: J. Bruce Fields; +Cc: Linux NFS Mailing list J. Bruce Fields wrote: > On Sat, Dec 06, 2008 at 08:44:02AM -0500, Steve Dickson wrote: >> In my recent trials and tribulations on dealing with >> the state file I found this fairly obvious bug: > > Yipes. This code needs all the eyes it can get, I guess. Exactly.. the more eyes the better... steved. ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-12-09 0:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-06 13:44 [PATCH] sm-notify: always exiting without any notification Steve Dickson
[not found] ` <493A81A2.5050904-AfCzQyP5zfLQT0dZR+AlfA@public.gmane.org>
2008-12-08 23:34 ` J. Bruce Fields
2008-12-09 0:35 ` Steve Dickson
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox