Skip to content

Conversation

adamziel
Copy link
Collaborator

Motivation for the change, related issues

After this PR, phpWorker.chdir("/tmp") remains in effect for all subsequently spawned PHP instances. Before this PR, it spawns a single PHP instance, sets the chdir there, and immediately reaps it, leaving the chdir unused by all future PHP instances.

Implementation details

Ensures PHPWorker calls php.chdir() on all newly spawned PHP instances. The underlying logic may also make sense at the PHPProcessManager level. However, since I need playgroundClient.chdir() to work correctly, we'll need a little something at the worker level as well – therefore I feel confident merging this change and revisiting it later if needed.

Testing Instructions (or ideally a Blueprint)

CI, this PR comes with a test.

@adamziel adamziel requested a review from a team September 30, 2025 13:54
@adamziel adamziel merged commit 64717c0 into trunk Sep 30, 2025
26 of 27 checks passed
@adamziel adamziel deleted the preserve-chroot-across-all-managed-php-instances branch September 30, 2025 14:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant