From a55113411fe8e6ef39e24c79564e39f07f5a8fdf Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 20 Nov 2008 12:25:11 +0000 Subject: * Nix daemon: reload the configuration file after forking (NIX-100). --- src/nix-worker/nix-worker.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/nix-worker') diff --git a/src/nix-worker/nix-worker.cc b/src/nix-worker/nix-worker.cc index dc9db0be42..1ba74f46fe 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; -- cgit 1.4.1