diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2004-05-13T19·14+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2004-05-13T19·14+0000 |
commit | a8306cb98ff920b38db5e5bbfcbe71bb36859b3f (patch) | |
tree | 9e4d1c694140b49582dee517206005644e2557d8 /src/libmain/shared.cc | |
parent | 5087c8f645cf971ee6dfd11c5c56c6b2b752d7ad (diff) |
* The build hooks used to implement distributed builds can now be run
in parallel. Hooks are more efficient: locks on output paths are only acquired when the hook says that it is willing to accept a build job. Hooks now work in two phases. First, they should first tell Nix whether they are willing to accept a job. Nix guarantuees that no two hooks will ever be in the first phase at the same time (this simplifies the implementation of hooks, since they don't have to perform locking (?)). Second, if they accept a job, they are then responsible for building it (on the remote system), and copying the result back. These can be run in parallel with other hooks and locally executed jobs. The implementation is a bit messy right now, though. * The directory `distributed' shows a (hacky) example of a hook that distributes build jobs over a set of machines listed in a configuration file.
Diffstat (limited to 'src/libmain/shared.cc')
-rw-r--r-- | src/libmain/shared.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/libmain/shared.cc b/src/libmain/shared.cc index feca410f4eb7..8f3c0121cf9b 100644 --- a/src/libmain/shared.cc +++ b/src/libmain/shared.cc @@ -82,6 +82,12 @@ static void initAndRun(int argc, char * * argv) if (sigaction(SIGINT, &act, &oact)) throw SysError("installing handler for SIGINT"); + /* Ignore SIGPIPE. */ + act.sa_handler = SIG_IGN; + act.sa_flags = 0; + if (sigaction(SIGPIPE, &act, &oact)) + throw SysError("ignoring SIGPIPE"); + /* Process the NIX_LOG_TYPE environment variable. */ string lt = getEnv("NIX_LOG_TYPE"); if (lt != "") setLogType(lt); |