forked from lix-project/nix-eval-jobs
fix crash in worker when opening the store
This commit is contained in:
parent
2dbcbe4179
commit
52e96bd421
|
@ -66,8 +66,11 @@ struct Proc {
|
||||||
std::make_shared<AutoCloseFD>(std::move(toPipe.readSide))}]() {
|
std::make_shared<AutoCloseFD>(std::move(toPipe.readSide))}]() {
|
||||||
debug("created worker process %d", getpid());
|
debug("created worker process %d", getpid());
|
||||||
try {
|
try {
|
||||||
auto state = std::make_shared<EvalState>(
|
auto evalStore = myArgs.evalStoreUrl
|
||||||
myArgs.searchPath, openStore(*myArgs.evalStoreUrl));
|
? openStore(*myArgs.evalStoreUrl)
|
||||||
|
: openStore();
|
||||||
|
auto state = std::make_shared<EvalState>(myArgs.searchPath,
|
||||||
|
evalStore);
|
||||||
Bindings &autoArgs = *myArgs.getAutoArgs(*state);
|
Bindings &autoArgs = *myArgs.getAutoArgs(*state);
|
||||||
proc(ref<EvalState>(state), autoArgs, *to, *from, myArgs);
|
proc(ref<EvalState>(state), autoArgs, *to, *from, myArgs);
|
||||||
} catch (Error &e) {
|
} catch (Error &e) {
|
||||||
|
|
Loading…
Reference in a new issue