-
Notifications
You must be signed in to change notification settings - Fork 209
Add support for thread-safe chdir in process spawning #981
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
Conversation
@swift-ci test |
Draft for now as I'm not confident this is safe at all. |
@swift-ci test |
Unfortunately I think this is likely to run afoul of open file descriptor inheritance. I think we may want to use a trampoline binary to accomplish this. |
I think that's true even for the current posix_spawn implementation because POSIX_SPAWN_CLOEXEC_DEFAULT is an Apple-specific extension. |
582ec49
to
b05addd
Compare
@swift-ci test |
82decf8
to
6f0bc88
Compare
@swift-ci test |
7c02181
to
4d171f8
Compare
@swift-ci test |
OK, I'm fairly confident this is sufficiently close to the existing posix_spawn based code path in llbuild (acknowledging that the posix_spawn path is also probably not perfect in one way or another) so as to get us unblocked for Amazon Linux 2 and OpenBSD. Please note that this does NOT change behavior for macOS, Linux with a sufficiently new (2.29+) Glibc, or any other platform which has posix_spawn_file_actions_addchdir[_np]. |
4d171f8
to
cd4e668
Compare
@swift-ci test |
@swift-ci smoke test |
@swift-ci test windows |
This is needed as a fallback to support Amazon Linux 2 and OpenBSD.
cd4e668
to
b59cd6d
Compare
@swift-ci smoke test |
@swift-ci test windows |
@swift-ci test windows platform |
This is needed as a fallback to support Amazon Linux 2 and OpenBSD.
Closes #980