nix run: Restore CPU affinity

Fixes #2359.
This commit is contained in:
Eelco Dolstra 2018-08-19 12:05:08 +02:00
parent 9b1bdf2db8
commit cc7b4386b1
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE

View file

@ -7,6 +7,7 @@
#include "finally.hh" #include "finally.hh"
#include "fs-accessor.hh" #include "fs-accessor.hh"
#include "progress-bar.hh" #include "progress-bar.hh"
#include "affinity.hh"
#if __linux__ #if __linux__
#include <sys/mount.h> #include <sys/mount.h>
@ -154,6 +155,8 @@ struct CmdRun : InstallablesCommand
restoreSignals(); restoreSignals();
restoreAffinity();
/* If this is a diverted store (i.e. its "logical" location /* If this is a diverted store (i.e. its "logical" location
(typically /nix/store) differs from its "physical" location (typically /nix/store) differs from its "physical" location
(e.g. /home/eelco/nix/store), then run the command in a (e.g. /home/eelco/nix/store), then run the command in a