upenn-acg/ProcessCache

Handle chdir

Closed this issue · 0 comments

krs85 commented

Handle chdir.

  • Execution struct needs to have both starting_cwd and cwd.

  • Intercept chdir.

  • Implement handle_chdir() which changes the curr execution's cwd to the new cwd. It also changes this for all child executions.

  • Use cwd() instead of starting_cwd()... basically everywhere...

  • EXCEPT when checking preconditions (CachedExecution should still have just starting_cwd).

  • Test: single process.

  • Test: parent and child process.