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

System polling: Harden the process calls to account for failure #6230

Merged
merged 1 commit into from
Oct 9, 2024

Conversation

kit-ty-kate
Copy link
Member

Split off from #6217
Fixes #6215

with_process_in was fairly brittle and would display stderr by default and ignore errors. The new version of that function (renamed process_in) now uses Unix.open_process_full and returns None if anything went wrong, fixing the issue on OpenBSD where getconf LONG_BIT would fail.

Backported to 2.3 in #6228

…Harden the process calls to account for failure

with_process_in was fairly brittle and would display stderr by default
and ignore errors. The new version of that function (renamed process_in)
now uses Unix.open_process_full and returns None if anything went wrong,
fixing the issue on OpenBSD where `getconf LONG_BIT` would fail.
Copy link
Collaborator

@rjbou rjbou left a comment

Choose a reason for hiding this comment

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

Thanks!

@rjbou rjbou changed the title OpamStd.Sys.{get_terminal_columns,uname,getconf,guess_shell_compat}: Harden the process calls to account for failure System polling: Harden the process calls to account for failure Oct 9, 2024
@kit-ty-kate kit-ty-kate merged commit 446671c into ocaml:master Oct 9, 2024
40 checks passed
@kit-ty-kate kit-ty-kate deleted the openbsd-fix branch October 9, 2024 16:39
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.

getconf: LONG_BIT: unknown variable
2 participants