Skip to content

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

Merged
kit-ty-kate merged 1 commit intoocaml:masterfrom
kit-ty-kate:openbsd-fix
Oct 9, 2024
Merged

System polling: Harden the process calls to account for failure#6230
kit-ty-kate merged 1 commit intoocaml:masterfrom
kit-ty-kate:openbsd-fix

Conversation

@kit-ty-kate
Copy link
Copy Markdown
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
Copy Markdown
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
@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