about summary refs log tree commit diff
path: root/src/libutil/util.hh
AgeCommit message (Collapse)AuthorFilesLines
2017-09-08 ThreadPool: On exception, interrupt the other worker threadsEelco Dolstra1-1/+4
2017-08-25 Handle SIGWINCHEelco Dolstra1-0/+10
2017-08-18 Remove unused decodeOctalEscapedAndy Wingo1-6/+0
Besides being unused, this function has a bug that it will incorrectly decode the path component Ubuntu\04016.04.2\040LTS\040amd64 as "Ubuntu.04.2 LTS amd64" instead of "Ubuntu 16.04.2 LTS amd64".
2017-08-16 Progress indicator: Show number of active itemsEelco Dolstra1-0/+14
2017-08-09 Use /proc/self/fd to efficiently close all FDs on LinuxEelco Dolstra1-2/+2
Issue #1506.
2017-05-16 Improve progress indicatorEelco Dolstra1-0/+2
2017-05-05 Figure out the user's home directory if $HOME is not setEelco Dolstra1-0/+3
2017-04-25 nix repl: Use $XDG_DATA_HOME for the readline historyEelco Dolstra1-0/+3
2017-04-21 add helper function to set 'interruptThrown'David McFarland1-1/+1
this fixes a linker failure on cygwin 64 due to some bad interaction between tls and shared libraries. see: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64697
2017-04-20 Read per-user settings from ~/.config/nix/nix.confEelco Dolstra1-1/+4
2017-03-21 Move istringstream_nocopy to a separate fileEelco Dolstra1-88/+0
2017-03-20 Merge branch 'darwin-s3-binary-cache-store' of https://github.com/shlevy/nixEelco Dolstra1-0/+87
2017-03-16 Remove "killing process <pid>" messagesEelco Dolstra1-1/+1
They convey no useful information.
2017-03-15 runProgram(): Distinguish between empty input and no inputEelco Dolstra1-1/+3
For example, if we call brotli with an empty input, it shouldn't read from the caller's stdin.
2017-03-08 Add missing header <sstream>Adrien Devresse1-0/+1
2017-03-06 istringstream_nocopy: Implement in a standards-compliant way.Shea Levy1-0/+87
Fixes the problem mentioned in e6a61b8da788efbbbb0eb690c49434b6b5fc9741 See #1135
2017-02-16 Support netrc in <nix/fetchurl.nix>Eelco Dolstra1-1/+1
This allows <nix/fetchurl.nix> to fetch private Git/Mercurial repositories, e.g. import <nix/fetchurl.nix> { url = https://edolstra@bitbucket.org/edolstra/my-private-repo/get/80a14018daed.tar.bz2; sha256 = "1mgqzn7biqkq3hf2697b0jc4wabkqhmzq2srdymjfa6sb9zb6qs7"; } where /etc/nix/netrc contains: machine bitbucket.org login edolstra password blabla... This works even when sandboxing is enabled. To do: add unpacking support (i.e. fetchzip functionality).
2017-02-01 Restore default signal handling in child processesEelco Dolstra1-4/+3
In particular, this fixes Ctrl-C in nix-shell sessions.
2017-01-26 Fix interrupt handlingEelco Dolstra1-0/+16
2017-01-19 Merge pull request #981 from shlevy/build-remote-c++Eelco Dolstra1-0/+3
build-remote: Implement in C++
2017-01-19 Kill builds when we get EOF on the log FDEelco Dolstra1-5/+6
This closes a long-time bug that allowed builds to hang Nix indefinitely (regardless of timeouts) simply by doing exec > /dev/null 2>&1; while true; do true; done Now, on EOF, we just send SIGKILL to the child to make sure it's really gone.
2017-01-19 CleanupEelco Dolstra1-5/+4
2017-01-17 Handle SIGINT etc. via a sigwait() signal handler threadEelco Dolstra1-1/+16
This allows other threads to install callbacks that run in a regular, non-signal context. In particular, we can use this to signal the downloader thread to quit. Closes #1183.
2017-01-16 AutoCloseDir: Use std::unique_ptrEelco Dolstra1-9/+6
2017-01-16 AutoDeleteArray -> std::unique_ptrEelco Dolstra1-12/+0
Also, switch to C++14 for std::make_unique.
2016-12-08 Fix S3BinaryCacheStoreEelco Dolstra1-51/+0
It failed with AWS error uploading ‘6gaxphsyhg66mz0a00qghf9nqf7majs2.ls.xz’: Unable to parse ExceptionName: MissingContentLength Message: You must provide the Content-Length HTTP header. possibly because the istringstream_nocopy introduced in 0d2ebb4373e509521f27a6e8f16bfd39d05b2188 doesn't supply the seek method that the AWS library expects. So bring back the old version, but only for S3BinaryCacheStore.
2016-11-26 Revert "Get rid of unicode quotes (#1140)"Eelco Dolstra1-7/+7
This reverts commit f78126bfd6b6c8477fcdbc09b2f98772dbe9a1e7. There really is no need for such a massive change...
2016-11-25 Get rid of unicode quotes (#1140)Guillaume Maudoux1-7/+7
2016-11-17 TypoEelco Dolstra1-1/+1
2016-11-17 Fix binary-cache-store buildShea Levy1-7/+8
2016-11-17 istringstream_nocopy: Implement in a standards-compliant wayShea Levy1-4/+40
Fixes #1135.
2016-11-16 S3BinaryCacheStore:: Eliminate a string copy while uploadingEelco Dolstra1-0/+14
This cuts hydra-queue-runner's peak memory usage by about a third.
2016-11-10 build-remote: Implement in C++Shea Levy1-0/+3
2016-10-12 Add some functions needed by hydraEelco Dolstra1-0/+1
2016-09-21 nix-build, nix-shell: Don't print error message if nix-store/nix-instantiate ↵Eelco Dolstra1-1/+10
fails
2016-09-20 TweakEelco Dolstra1-1/+2
2016-09-20 nix-shell: Fix $PATH handling in the impure caseEelco Dolstra1-0/+5
We were passing "p=$PATH" rather than "p=$PATH;", resulting in some invalid shell code. Also, construct a separate environment for the child rather than overwriting the parent's.
2016-09-16 Make computeFSClosure() single-threaded againEelco Dolstra1-0/+39
The fact that queryPathInfo() is synchronous meant that we needed a thread for every concurrent binary cache lookup, even though they end up being handled by the same download thread. Requiring hundreds of threads is not a good idea. So now there is an asynchronous version of queryPathInfo() that takes a callback function to process the result. Similarly, enqueueDownload() now takes a callback rather than returning a future. Thus, a command like nix path-info --store https://cache.nixos.org/ -r /nix/store/slljrzwmpygy1daay14kjszsr9xix063-nixos-16.09beta231.dccf8c5 that returns 4941 paths now takes 1.87s using only 2 threads (the main thread and the downloader thread). (This is with a prewarmed CloudFront.)
2016-09-16 printMsg(): Don't check for interruptsEelco Dolstra1-2/+2
Having the logger function potentially throw exceptions is Heisenbuggy.
2016-09-14 Add a toLower utility functionEelco Dolstra1-0/+4
2016-09-14 Move some .drv parsing functions out of utilEelco Dolstra1-14/+0
2016-07-11 Modernize AutoCloseFDShea Levy1-6/+8
2016-05-04 Cleanup: Remove singleton()Eelco Dolstra1-9/+0
2016-04-29 Support Git repos in the Nix pathEelco Dolstra1-0/+4
E.g. $ nix-build -I nixpkgs=git://github.com/NixOS/nixpkgs '<nixpkgs>' -A hello This is not extremely useful yet because you can't specify a branch/revision.
2016-04-25 Improved logging abstractionEelco Dolstra1-48/+1
This also gets rid of --log-type, since the nested log type isn't useful in a multi-threaded situation, and nobody cares about the "pretty" log type.
2016-04-20 Cache path info lookups in SQLiteEelco Dolstra1-0/+3
This re-implements the binary cache database in C++, allowing it to be used by other Store backends, in particular the S3 backend.
2016-03-29 Improve SIGINT handling in multi-threaded programsEelco Dolstra1-0/+2
The flag remembering whether an Interrupted exception was thrown is now thread-local. Thus, all threads will (eventually) throw Interrupted. Previously, one thread would throw Interrupted, and then the other threads wouldn't see that they were supposed to quit.
2016-03-29 Add "nix verify-paths" commandEelco Dolstra1-1/+1
Unlike "nix-store --verify-path", this command verifies signatures in addition to store path contents, is multi-threaded (especially useful when verifying binary caches), and has a progress indicator. Example use: $ nix verify-paths --store https://cache.nixos.org -r $(type -p thunderbird) ... [17/132 checked] checking ‘/nix/store/rawakphadqrqxr6zri2rmnxh03gqkrl3-autogen-5.18.6’
2016-02-24 deletePath(): Succeed if path doesn't existEelco Dolstra1-2/+2
Also makes it robust against concurrent deletions.
2016-02-12 Merge pull request #762 from ctheune/ctheune-floatsEelco Dolstra1-0/+8
Implement floats