about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2018-08-19T10·05+0200
committerEelco Dolstra <edolstra@gmail.com>2018-08-19T10·05+0200
commitcc7b4386b16885a22ccabb019381539fecb00230 (patch)
tree635696db4c5c521bd165bb82190760fe6f6d63aa /src
parent9b1bdf2db8798c024e6fbe84d4144c04f61d80c7 (diff)
nix run: Restore CPU affinity
Fixes #2359.
Diffstat (limited to 'src')
-rw-r--r--src/nix/run.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nix/run.cc b/src/nix/run.cc
index 65ced34759b1..35b763345872 100644
--- a/src/nix/run.cc
+++ b/src/nix/run.cc
@@ -7,6 +7,7 @@
 #include "finally.hh"
 #include "fs-accessor.hh"
 #include "progress-bar.hh"
+#include "affinity.hh"
 
 #if __linux__
 #include <sys/mount.h>
@@ -154,6 +155,8 @@ struct CmdRun : InstallablesCommand
 
         restoreSignals();
 
+        restoreAffinity();
+
         /* If this is a diverted store (i.e. its "logical" location
            (typically /nix/store) differs from its "physical" location
            (e.g. /home/eelco/nix/store), then run the command in a