Skip to content

Commit

Permalink
unsafe-perform-io: force the returned value
Browse files Browse the repository at this point in the history
In nix::EvalState::forceValue, a tApp will result in a function call but
the return value will not be forced further. The upshot of this is that
all primops must return a forced value since everything in nix expects
forceValue to result in a real value.
  • Loading branch information
shlevy committed Nov 21, 2014
1 parent c77f247 commit 3b8a20c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
AC_INIT([nix-exec], [3.0.0])
AC_INIT([nix-exec], [3.0.1])

LT_INIT([disable-static])

Expand Down
1 change: 1 addition & 0 deletions src/run-io.cc
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,7 @@ static void unsafe( nix::EvalState & state
, nix::Value & v
) {
run_io(state, args[0], &pos, v);
state.forceValue(v);
}

void setup_unsafe_perform_io(nix::EvalState & state, nix::Value & v) {
Expand Down

0 comments on commit 3b8a20c

Please sign in to comment.