Skip to content
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

Thoughts on using flag O_CLOEXEC for unix source sets? #1447

Open
05nelsonm opened this issue Feb 28, 2024 · 3 comments
Open

Thoughts on using flag O_CLOEXEC for unix source sets? #1447

05nelsonm opened this issue Feb 28, 2024 · 3 comments

Comments

@05nelsonm
Copy link
Contributor

05nelsonm commented Feb 28, 2024

Wanted to pop in and ask about the possibility of always opening descriptors with the O_CLOEXEC flag, or utilizing the e flag with fopen.

EDIT: Can sling up a PR if it would be an acceptable addition to the library!

@swankjesse
Copy link
Member

Yeah, seems quite reasonable. Do you have a specific use case? I’m curious about forking and execing in Kotlin/Native and haven’t seen many examples.

@swankjesse
Copy link
Member

Please send a PR!

@05nelsonm
Copy link
Contributor Author

Do you have a specific use case?

Not really, just thought it'd be an easy win for everyone.

I’m curious about forking and execing in Kotlin/Native and haven’t seen many examples

https://github.com/05nelsonm/kmp-process/blob/master/library/process/src/unixMain/kotlin/io/matthewnelson/kmp/process/internal/PlatformBuilder.kt

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

No branches or pull requests

2 participants