mirror of
https://github.com/NixOS/nix.git
synced 2025-11-20 17:29:36 +01:00
Unshare mount namespace in main()
Doing it as a side-effect of calling LocalStore::makeStoreWritable() is very ugly. Also, make sure that stopping the progress bar joins the update thread, otherwise that thread should be unshared as well.
This commit is contained in:
parent
7a71621b7c
commit
ff2af4d64e
3 changed files with 17 additions and 11 deletions
|
|
@ -103,17 +103,19 @@ public:
|
|||
~ProgressBar()
|
||||
{
|
||||
stop();
|
||||
updateThread.join();
|
||||
}
|
||||
|
||||
void stop() override
|
||||
{
|
||||
auto state(state_.lock());
|
||||
if (!state->active) return;
|
||||
state->active = false;
|
||||
writeToStderr("\r\e[K");
|
||||
updateCV.notify_one();
|
||||
quitCV.notify_one();
|
||||
{
|
||||
auto state(state_.lock());
|
||||
if (!state->active) return;
|
||||
state->active = false;
|
||||
writeToStderr("\r\e[K");
|
||||
updateCV.notify_one();
|
||||
quitCV.notify_one();
|
||||
}
|
||||
updateThread.join();
|
||||
}
|
||||
|
||||
bool isVerbose() override {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue