about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libstore/globals.cc7
-rw-r--r--src/libstore/globals.hh2
-rw-r--r--src/nix-worker/nix-worker.cc6
3 files changed, 14 insertions, 1 deletions
diff --git a/src/libstore/globals.cc b/src/libstore/globals.cc
index 19087f657d56..27d75faec248 100644
--- a/src/libstore/globals.cc
+++ b/src/libstore/globals.cc
@@ -118,5 +118,12 @@ unsigned int queryIntSetting(const string & name, unsigned int def)
     return n;
 }
 
+
+void reloadSettings()
+{
+    settingsRead = false;
+    settings.clear();
+}
+
  
 }
diff --git a/src/libstore/globals.hh b/src/libstore/globals.hh
index 2eb68625a6f5..7e973025c978 100644
--- a/src/libstore/globals.hh
+++ b/src/libstore/globals.hh
@@ -107,6 +107,8 @@ bool queryBoolSetting(const string & name, bool def);
 
 unsigned int queryIntSetting(const string & name, unsigned int def);
 
+void reloadSettings();
+
     
 }
 
diff --git a/src/nix-worker/nix-worker.cc b/src/nix-worker/nix-worker.cc
index dc9db0be427c..1ba74f46fee9 100644
--- a/src/nix-worker/nix-worker.cc
+++ b/src/nix-worker/nix-worker.cc
@@ -627,13 +627,17 @@ static void daemonLoop()
 
             case 0:
                 try { /* child */
-                    
+
                     /* Background the worker. */
                     if (setsid() == -1)
                         throw SysError(format("creating a new session"));
 
                     /* 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;