diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2008-08-02T12·54+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2008-08-02T12·54+0000 |
commit | 3c92ea399d717dc45b3fa91424c0dadc0239ebf2 (patch) | |
tree | 7cde9f533a6ee575615da5452e04c05dc0939f02 /src/libutil/util.hh | |
parent | fc691e1cbdcddb8c553cba06d4089bc1b60e3d98 (diff) |
* Make nix-env --dry-run print the paths to be substituted correctly
again. (After the previous substituter mechanism refactoring I didn't update the code that obtains the references of substitutable paths.) This required some refactoring: the substituter programs are now kept running and receive/respond to info requests via stdin/stdout.
Diffstat (limited to 'src/libutil/util.hh')
-rw-r--r-- | src/libutil/util.hh | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libutil/util.hh b/src/libutil/util.hh index 5d28a8308cb8..6c67e450b557 100644 --- a/src/libutil/util.hh +++ b/src/libutil/util.hh @@ -245,6 +245,10 @@ void killUser(uid_t uid); string runProgram(Path program, bool searchPath = false, const Strings & args = Strings()); +/* Close all file descriptors except stdin, stdout, stderr, and those + listed in the given set. Good practice in child processes. */ +void closeMostFDs(const set<int> & exceptions); + /* Wrapper around _exit() on Unix and ExitProcess() on Windows. (On Cygwin, _exit() doesn't seem to do the right thing.) */ void quickExit(int status); |