* Nix daemon: reload the configuration file after forking (NIX-100).
This commit is contained in:
parent
c202523e53
commit
a55113411f
3 changed files with 14 additions and 1 deletions
|
@ -119,4 +119,11 @@ unsigned int queryIntSetting(const string & name, unsigned int def)
|
|||
}
|
||||
|
||||
|
||||
void reloadSettings()
|
||||
{
|
||||
settingsRead = false;
|
||||
settings.clear();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -107,6 +107,8 @@ bool queryBoolSetting(const string & name, bool def);
|
|||
|
||||
unsigned int queryIntSetting(const string & name, unsigned int def);
|
||||
|
||||
void reloadSettings();
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -635,6 +635,10 @@ static void daemonLoop()
|
|||
/* Restore normal handling of SIGCHLD. */
|
||||
setSigChldAction(false);
|
||||
|
||||
/* Since the daemon can be long-running, the
|
||||
settings may have changed. So force a reload. */
|
||||
reloadSettings();
|
||||
|
||||
/* Handle the connection. */
|
||||
from.fd = remote;
|
||||
to.fd = remote;
|
||||
|
|
Loading…
Reference in a new issue