aboutsummaryrefslogtreecommitdiff
path: root/src/nix-daemon
AgeCommit message (Collapse)Author
2014-11-19nix-daemon: Call exit(), not _exit()Eelco Dolstra
This was preventing destructors from running. In particular, it was preventing the deletion of the temproot file for each worker process. It may also have been responsible for the excessive WAL growth on Hydra (due to the SQLite database not being closed properly). Apparently broken by accident in 8e9140cfdef9dbd1eb61e4c75c91d452ab5e4a74.
2014-10-31nix-daemon: Get peer credentials on Mac OS XEelco Dolstra
This makes allowed-users and trusted-users work on Mac OS X.
2014-10-31Improve error message if the daemon worker fails to startEelco Dolstra
2014-09-25nix-daemon: Close unnecessary fdEelco Dolstra
2014-09-01Add an 'optimiseStore' remote procedure call.Ludovic Courtès
2014-08-21Use PR_SET_PDEATHSIG to ensure child cleanupEelco Dolstra
2014-08-20Use proper quotes everywhereEelco Dolstra
2014-08-13Refactor option handlingEelco Dolstra
2014-08-05DohEelco Dolstra
2014-08-04Move some options out of globalsEelco Dolstra
2014-07-24Remove some dead codeEelco Dolstra
2014-07-23Pass -pthread only for programs that need itEelco Dolstra
2014-07-23nix-daemon: Less verbosityEelco Dolstra
2014-07-23nix-daemon: Simplify stderr handlingEelco Dolstra
2014-07-23nix-daemon: Use a thread instead of SIGPOLL to catch client disconnectsEelco Dolstra
The thread calls poll() to wait until a HUP (or other error event) happens on the client connection. If so, it sends SIGINT to the main thread, which is then cleaned up normally. This is much nicer than messing around with SIGPOLL.
2014-07-19Revert old useBuildHook behaviourEelco Dolstra
2014-07-17nix-daemon: Add trusted-users and allowed-users optionsEelco Dolstra
‘trusted-users’ is a list of users and groups that have elevated rights, such as the ability to specify binary caches. It defaults to ‘root’. A typical value would be ‘@wheel’ to specify all users in the wheel group. ‘allowed-users’ is a list of users and groups that are allowed to connect to the daemon. It defaults to ‘*’. A typical value would be ‘@users’ to specify the ‘users’ group.
2014-07-17nix-daemon: Show name of connecting userEelco Dolstra
2014-07-17nix-daemon: Only print connection info if we have SO_PEERCREDEelco Dolstra
2014-07-17nix-daemon: Fix compat with older clientsEelco Dolstra
2014-07-10Refactoring: Move all fork handling into a higher-order functionEelco Dolstra
C++11 lambdas ftw.
2014-06-10Report daemon OOM betterEelco Dolstra
When copying a large path causes the daemon to run out of memory, you now get: error: Nix daemon out of memory instead of: error: writing to file: Broken pipe
2014-04-03Fix compile errors on IllumosDanny Wilson
2014-03-30boost::shared_ptr -> std::shared_ptrEelco Dolstra
2014-03-18Fix tabsEelco Dolstra
2014-03-18Allow recovery from isValidPath RPCs with an invalid pathLudovic Courtès
Currently, clients cannot recover from an isValidPath RPC with an invalid path parameter because the daemon closes the connection when that happens. More precisely: 1. in performOp, wopIsValidPath case, ‘readStorePath’ raises an ‘Error’ exception; 2. that exception is caught by the handler in ‘processConnection’; 3. the handler determines errorAllowed == false, and thus exits after sending the message. This last part is fixed by calling ‘startWork’ early on, as in the patch below. The same reasoning could be applied to all the RPCs that take one or more store paths as inputs, but isValidPath is, by definition, likely to be passed invalid paths in the first place, so it’s important for this one to allow recovery.
2014-03-17Fix -j and other flags when using the daemonEelco Dolstra
2014-02-26Simplify getting use-ssh-substituter from untrusted usersEelco Dolstra
2014-02-01Remove AutomakefilesEelco Dolstra
2014-02-01Update Makefile variable namesEelco Dolstra
2014-01-30Rename Makefile -> local.mkEelco Dolstra
2014-01-30Install nix-worker symlinkEelco Dolstra
2014-01-09Update MakefilesEelco Dolstra
2013-11-25Rename Makefile.new -> MakefileEelco Dolstra
2013-11-22Rename $(here) to $(d) for brevity, and remove trailing slashEelco Dolstra
2013-11-22New non-recursive, plain Make-based build systemEelco Dolstra
2013-10-02Report OOM errors betterEelco Dolstra
2013-10-02Fix typoEelco Dolstra
2013-08-07Run the daemon worker on the same CPU as the clientEelco Dolstra
On a system with multiple CPUs, running Nix operations through the daemon is significantly slower than "direct" mode: $ NIX_REMOTE= nix-instantiate '<nixos>' -A system real 0m0.974s user 0m0.875s sys 0m0.088s $ NIX_REMOTE=daemon nix-instantiate '<nixos>' -A system real 0m2.118s user 0m1.463s sys 0m0.218s The main reason seems to be that the client and the worker get moved to a different CPU after every call to the worker. This patch adds a hack to lock them to the same CPU. With this, the overhead of going through the daemon is very small: $ NIX_REMOTE=daemon nix-instantiate '<nixos>' -A system real 0m1.074s user 0m0.809s sys 0m0.098s
2013-07-07Leave `HAVE_HUP_NOTIFICATION' undefined on GNU/Hurd.Ludovic Courtès
2013-06-12nix-daemon: Trust options like binary-caches when the client is rootEelco Dolstra
Fixes #127.
2013-04-23Nix daemon: respect build timeout from the clientEelco Dolstra
2013-03-08Revert "Prevent config.h from being clobbered"Eelco Dolstra
This reverts commit 28bba8c44f484eae38e8a15dcec73cfa999156f6.
2013-03-07Prevent config.h from being clobberedEelco Dolstra
2013-02-19Add `Settings::nixDaemonSocketFile'.Ludovic Courtès
2012-12-20nix-store -q --roots: Respect the gc-keep-outputs/gc-keep-derivations settingsEelco Dolstra
So if a path is not garbage solely because it's reachable from a root due to the gc-keep-outputs or gc-keep-derivations settings, ‘nix-store -q --roots’ now shows that root.
2012-11-15Don't use std::cerr in a few placesEelco Dolstra
Slightly scared of using std::cerr in a vforked process...
2012-10-03Rename nix-worker to nix-daemonEelco Dolstra