Skip to content

Commit

Permalink
Child working directory will be now adopted by the parent on Sys::she…
Browse files Browse the repository at this point in the history
…llexec()
  • Loading branch information
nthnn committed May 20, 2024
1 parent f422dd5 commit 821d5cc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/rishka_syscalls.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,8 @@ int64_t RishkaSyscall::Sys::shellExec(RishkaVM* parent_vm) {
return -1;
}

child_vm->run(count, tokens + 1);
child_vm->run(count, tokens);
parent_vm->setWorkingDirectory(child_vm->getWorkingDirectory());
child_vm->reset();

int64_t exitCode = child_vm->getExitCode();
Expand Down

0 comments on commit 821d5cc

Please sign in to comment.