From: neilbrown Date: Mon, 6 Dec 2004 01:24:46 +0000 (+0000) Subject: HA statd updates X-Git-Tag: nfs-utils-1-0-7-pre2~3 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=2a8ca391fcc5f34aa02aa985a17823f6f7a4ad9f;p=nfs-utils.git HA statd updates --- diff --git a/ChangeLog b/ChangeLog index 0def56f..e57a496 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,12 @@ -2004-12-07 Marc Eshel +2004-12-06 Paul Clements + * support/include/ha-callout.h: get return status from waitpid + correctly. + * utils/statd/statd.c(sigusr): print current start when re-reading + notify list due to SIGUSR1 + * utils/statd/svc_run.c(my_svc_run): call change_state when + re-notifying clients. + +2004-12-06 Marc Eshel * utils/statd/svc_run.c(my_svc_run): allow loop to exit when in MODE_NOTIFY_ONLY *utils/statd/rmtcall.c(statd_get_socket): if a hostname is given diff --git a/support/include/ha-callout.h b/support/include/ha-callout.h index 707d51b..8acf0de 100644 --- a/support/include/ha-callout.h +++ b/support/include/ha-callout.h @@ -39,7 +39,7 @@ ha_callout(char *event, char *arg1, char *arg2, int arg3) exit(2); case -1: perror("fork"); break; - default: ret = waitpid(pid, NULL, 0); + default: pid = waitpid(pid, &ret, 0); } #ifdef dprintf diff --git a/utils/statd/statd.c b/utils/statd/statd.c index 3f64115..48362c0 100644 --- a/utils/statd/statd.c +++ b/utils/statd/statd.c @@ -111,7 +111,8 @@ killer (int sig) static void sigusr (int sig) { - dprintf (N_DEBUG, "Caught signal %d, re-reading notify list.", sig); + dprintf (N_DEBUG, "Caught signal %d, re-notifying (state %d).", sig, + MY_STATE); re_notify = 1; } diff --git a/utils/statd/svc_run.c b/utils/statd/svc_run.c index 7b69dc8..f6bcbb9 100644 --- a/utils/statd/svc_run.c +++ b/utils/statd/svc_run.c @@ -88,6 +88,9 @@ my_svc_run(void) if (svc_stop) return; if (re_notify) { + change_state(); + dprintf(N_DEBUG, "Notifying...(new state %d)", + MY_STATE); notify_hosts(); re_notify = 0; }