svn commit: r229946 - head/sbin/hastd
Pawel Jakub Dawidek
pjd at FreeBSD.org
Tue Jan 10 22:41:10 UTC 2012
Author: pjd
Date: Tue Jan 10 22:41:09 2012
New Revision: 229946
URL: http://svn.freebsd.org/changeset/base/229946
Log:
- Fix a bug where pidfile was removed in SIGHUP when it hasn't changed in
configuration file.
- Log the fact that pidfile has changed.
MFC after: 3 days
Modified:
head/sbin/hastd/hastd.c
Modified: head/sbin/hastd/hastd.c
==============================================================================
--- head/sbin/hastd/hastd.c Tue Jan 10 22:39:07 2012 (r229945)
+++ head/sbin/hastd/hastd.c Tue Jan 10 22:41:09 2012 (r229946)
@@ -573,10 +573,14 @@ hastd_reload(void)
/*
* Switch to new pidfile.
*/
- (void)pidfile_remove(pfh);
- pfh = newpfh;
- (void)strlcpy(cfg->hc_pidfile, newcfg->hc_pidfile,
- sizeof(cfg->hc_pidfile));
+ if (newpfh != NULL) {
+ pjdlog_info("Pidfile changed from %s to %s.", cfg->hc_pidfile,
+ newcfg->hc_pidfile);
+ (void)pidfile_remove(pfh);
+ pfh = newpfh;
+ (void)strlcpy(cfg->hc_pidfile, newcfg->hc_pidfile,
+ sizeof(cfg->hc_pidfile));
+ }
/*
* Switch to new listen addresses. Close all that were removed.
*/
More information about the svn-src-head
mailing list