diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/libexpr/primops.cc | 4 | ||||
-rw-r--r-- | src/libexpr/primops.hh | 8 | ||||
-rw-r--r-- | src/nix-daemon/nix-daemon.cc | 2 |
3 files changed, 11 insertions, 3 deletions
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc index c88f677da085..9e7651da725f 100644 --- a/src/libexpr/primops.cc +++ b/src/libexpr/primops.cc @@ -155,7 +155,7 @@ static void prim_scopedImport(EvalState & state, const Pos & pos, Value * * args extern "C" typedef void (*ValueInitializer)(EvalState & state, Value & v); /* Load a ValueInitializer from a DSO and return whatever it initializes */ -static void prim_importNative(EvalState & state, const Pos & pos, Value * * args, Value & v) +void prim_importNative(EvalState & state, const Pos & pos, Value * * args, Value & v) { PathSet context; Path path = state.coerceToPath(pos, *args[0], context); @@ -193,7 +193,7 @@ static void prim_importNative(EvalState & state, const Pos & pos, Value * * args /* Execute a program and parse its output */ -static void prim_exec(EvalState & state, const Pos & pos, Value * * args, Value & v) +void prim_exec(EvalState & state, const Pos & pos, Value * * args, Value & v) { state.forceList(*args[0], pos); auto elems = args[0]->listElems(); diff --git a/src/libexpr/primops.hh b/src/libexpr/primops.hh index 31bf3f84f6c7..c790b30f6d0b 100644 --- a/src/libexpr/primops.hh +++ b/src/libexpr/primops.hh @@ -15,4 +15,12 @@ struct RegisterPrimOp RegisterPrimOp(std::string name, size_t arity, PrimOpFun fun); }; +/* These primops are disabled without enableNativeCode, but plugins + may wish to use them in limited contexts without globally enabling + them. */ +/* Load a ValueInitializer from a DSO and return whatever it initializes */ +void prim_importNative(EvalState & state, const Pos & pos, Value * * args, Value & v); +/* Execute a program and parse its output */ +void prim_exec(EvalState & state, const Pos & pos, Value * * args, Value & v); + } diff --git a/src/nix-daemon/nix-daemon.cc b/src/nix-daemon/nix-daemon.cc index f28a52b73ff9..35603af7082a 100644 --- a/src/nix-daemon/nix-daemon.cc +++ b/src/nix-daemon/nix-daemon.cc @@ -1035,7 +1035,7 @@ static void daemonLoop(char * * argv) }, options); } catch (Interrupted & e) { - throw; + return; } catch (Error & e) { printError(format("error processing connection: %1%") % e.msg()); } |