Skip to content

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

MaxDesiatov
Copy link
Contributor

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.

@MaxDesiatov
Copy link
Contributor Author

@swift-ci test

@al45tair al45tair requested a review from shahmishal June 15, 2023 14:37

// Reset the previous working directory path.
fileManager.changeCurrentDirectoryPath(previousDirectoryPath)
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch, thanks!

@MaxDesiatov MaxDesiatov requested a review from Lukasa June 15, 2023 14:56
@MaxDesiatov
Copy link
Contributor Author

@swift-ci smoke test

@MaxDesiatov
Copy link
Contributor Author

@swift-ci test

@MaxDesiatov
Copy link
Contributor Author

@swift-ci test windows

1 similar comment
@MaxDesiatov
Copy link
Contributor Author

@swift-ci test windows

@MaxDesiatov
Copy link
Contributor Author

@swift-ci test macos

@jakepetroules
Copy link
Contributor

@MaxDesiatov Note that macOS has posix_spawn_file_actions_addchdir_np too.

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.

CFPlatform.c:2214:10: error: call to undeclared function 'posix_spawn_file_actions_addchdir_np'
3 participants