summaryrefslogtreecommitdiffstats
path: root/sbin/hastd
diff options
context:
space:
mode:
authorpjd <pjd@FreeBSD.org>2011-01-22 22:31:55 +0000
committerpjd <pjd@FreeBSD.org>2011-01-22 22:31:55 +0000
commit6dd16e11a465cf01389cd3b7436ebd9ff7b12a58 (patch)
tree7985efc45fd72569178258def31ea018e043707e /sbin/hastd
parent44f0ead079c8ceafe9193bfb39d43d76939e3e25 (diff)
downloadFreeBSD-src-6dd16e11a465cf01389cd3b7436ebd9ff7b12a58.zip
FreeBSD-src-6dd16e11a465cf01389cd3b7436ebd9ff7b12a58.tar.gz
- On primary worker reload, update hr_exec field.
- Update comment. MFC after: 1 week
Diffstat (limited to 'sbin/hastd')
-rw-r--r--sbin/hastd/hastd.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/sbin/hastd/hastd.c b/sbin/hastd/hastd.c
index 3ecd9c2..ea9821e 100644
--- a/sbin/hastd/hastd.c
+++ b/sbin/hastd/hastd.c
@@ -306,8 +306,9 @@ hastd_reload(void)
* recreating it.
*
* We do just reload (send SIGHUP to worker process) if we act as
- * PRIMARY, but only remote address, replication mode and timeout
- * has changed. For those, there is no need to restart worker process.
+ * PRIMARY, but only if remote address, replication mode, timeout or
+ * execution path has changed. For those, there is no need to restart
+ * worker process.
* If PRIMARY receives SIGHUP, it will reconnect if remote address or
* replication mode has changed or simply set new timeout if only
* timeout has changed.
@@ -335,6 +336,8 @@ hastd_reload(void)
sizeof(cres->hr_remoteaddr));
cres->hr_replication = nres->hr_replication;
cres->hr_timeout = nres->hr_timeout;
+ strlcpy(cres->hr_exec, nres->hr_exec,
+ sizeof(cres->hr_exec));
if (cres->hr_workerpid != 0) {
if (kill(cres->hr_workerpid, SIGHUP) < 0) {
pjdlog_errno(LOG_WARNING,
OpenPOWER on IntegriCloud