about summary refs log tree commit diff
path: root/src/nix-worker/nix-worker.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2008-11-20T12·25+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2008-11-20T12·25+0000
commita55113411fe8e6ef39e24c79564e39f07f5a8fdf (patch)
tree45819b6a0de04d178f13011274b546ffa9c3ada7 /src/nix-worker/nix-worker.cc
parentc202523e5304c41ef9a6c7a54951bf39a33ff26e (diff)
* Nix daemon: reload the configuration file after forking (NIX-100).
Diffstat (limited to 'src/nix-worker/nix-worker.cc')
-rw-r--r--src/nix-worker/nix-worker.cc6
1 files changed, 5 insertions, 1 deletions
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;