-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Process: check for posix_spawn_file_actions_addchdir_np
#4763
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@swift-ci test |
Sources/Foundation/Process.swift
Outdated
|
||
// Reset the previous working directory path. | ||
fileManager.changeCurrentDirectoryPath(previousDirectoryPath) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a semantic change: we must restore this if closure
throws.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch, thanks!
@swift-ci smoke test |
@swift-ci test |
@swift-ci test windows |
1 similar comment
@swift-ci test windows |
@swift-ci test macos |
@MaxDesiatov Note that macOS has |
Before calling
posix_spawn_file_actions_addchdir_np
we should check if it's available. On non-Linux platform where we know it can't be available we're taking a faster path that doesn't check at run time.Resolves #4762.