Skip to content

fix(rpc): restore process cwd inheritance on macOS#15552

Merged
rgrinberg merged 1 commit into
ocaml:mainfrom
rgrinberg:push-pryuvvxqxmty
Jul 19, 2026
Merged

fix(rpc): restore process cwd inheritance on macOS#15552
rgrinberg merged 1 commit into
ocaml:mainfrom
rgrinberg:push-pryuvvxqxmty

Conversation

@rgrinberg

Copy link
Copy Markdown
Member

The long Unix socket workaround sets a per-thread cwd. Restoring it with
pthread_chdir leaves the override active, so the thread no longer follows
changes to the process-wide cwd.

Reset the per-thread cwd with pthread_fchdir(-1), and cover the behavior
with a macOS regression test.

The long Unix socket workaround sets a per-thread cwd. Restoring it with
pthread_chdir leaves the override active, so the thread no longer follows
changes to the process-wide cwd.

Reset the per-thread cwd with pthread_fchdir(-1), and cover the behavior
with a macOS regression test.

Signed-off-by: Rudi Grinberg <me@rgrinberg.com>
@rgrinberg
rgrinberg merged commit e493a82 into ocaml:main Jul 19, 2026
28 checks passed
@Alizter Alizter added this to the 3.25.0 milestone Jul 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants