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

fix(python): Set O_CLOEXEC on duplicated file descriptor #17537

Merged
merged 1 commit into from
Jul 12, 2024

Conversation

ruihe774
Copy link
Contributor

This is a minor fix for #17315.

Both Python and Rust set O_CLOEXEC for opened files. However, dup clears this flag. This PR uses F_DUPFD_CLOEXEC to explicitly make dupped fd non-inheritable.

@github-actions github-actions bot added fix Bug fix python Related to Python Polars labels Jul 10, 2024
@alexander-beedie alexander-beedie changed the title fix(python): Set O_CLOEXEC on dupped fd fix(python): Set O_CLOEXEC on duplicated file descriptor Jul 10, 2024
py-polars/src/file.rs Outdated Show resolved Hide resolved
Copy link

codecov bot commented Jul 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.43%. Comparing base (daf2e49) to head (9658309).
Report is 14 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #17537      +/-   ##
==========================================
- Coverage   80.48%   80.43%   -0.06%     
==========================================
  Files        1483     1484       +1     
  Lines      195118   195342     +224     
  Branches     2778     2778              
==========================================
+ Hits       157039   157119      +80     
- Misses      37568    37711     +143     
- Partials      511      512       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ritchie46 ritchie46 merged commit 0c3e7f3 into pola-rs:main Jul 12, 2024
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Bug fix python Related to Python Polars
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants