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(cli): Fix issue when running sysctl through USR2 in macOS #956

Merged
merged 1 commit into from
Feb 19, 2024

Conversation

msbrogli
Copy link
Member

@msbrogli msbrogli commented Feb 16, 2024

Motivation

macOS has a different behavior when handling named pipes created by mkfifo.

In macOS, if a fifo is opened for reading, the open() call will block if there are no writers—that is, if somebody else does not have the fifo open for writing.

In Linux, the open() call is not blocking so the previous code worked fine and logged the fifo path as expected.

Acceptance Criteria

  1. Move out the open() call from temp_fifo().
  2. Run the open() after logging the fifo path.

Checklist

  • If you are requesting a merge into master, confirm this code is production-ready and can be included in future releases as soon as it gets merged

@msbrogli msbrogli self-assigned this Feb 16, 2024
@msbrogli msbrogli requested a review from jansegre as a code owner February 16, 2024 16:54
@msbrogli msbrogli changed the title fix(cli): Fix issue when running sysctl through USR2 in MacOS fix(cli): Fix issue when running sysctl through USR2 in macOS Feb 16, 2024
jansegre
jansegre previously approved these changes Feb 16, 2024
pedroferreira1
pedroferreira1 previously approved these changes Feb 16, 2024
Copy link

codecov bot commented Feb 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (1f68ec7) 85.42% compared to head (5d059ca) 85.31%.
Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #956      +/-   ##
==========================================
- Coverage   85.42%   85.31%   -0.12%     
==========================================
  Files         292      292              
  Lines       22568    22581      +13     
  Branches     3395     3401       +6     
==========================================
- Hits        19278    19264      -14     
- Misses       2621     2641      +20     
- Partials      669      676       +7     

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

@msbrogli msbrogli merged commit 00967a7 into master Feb 19, 2024
1 check passed
@msbrogli msbrogli deleted the fix/usr2-sysctl branch February 19, 2024 19:33
@jansegre jansegre mentioned this pull request Feb 19, 2024
2 tasks
@jansegre jansegre mentioned this pull request Feb 26, 2024
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants