mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-11-22 21:31:05 +01:00
- 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
This commit is contained in:
parent
2b1b224d24
commit
4bbeefbb07
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=229946
@ -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.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user