Skip to content

[2.3 backport] System polling: Harden the process calls to account for failure#6228

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

[2.3 backport] System polling: Harden the process calls to account for failure#6228
kit-ty-kate merged 1 commit intoocaml:2.3from
kit-ty-kate:2.3-openbsd-fix

Conversation

@kit-ty-kate
Copy link
Copy Markdown
Member

@kit-ty-kate kit-ty-kate commented Oct 7, 2024

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 (End_of_file wasn't handled)

Backports #6230 to 2.3

@kit-ty-kate kit-ty-kate added this to the 2.3.0~alpha2 milestone Oct 7, 2024
@kit-ty-kate kit-ty-kate force-pushed the 2.3-openbsd-fix branch 2 times, most recently from 212e1fb to b568fd0 Compare October 7, 2024 15:05
@kit-ty-kate kit-ty-kate changed the title [2.3 backport] Fix opam on OpenBSD [2.3 backport] OpamStd.Sys.{get_terminal_columns,uname,getconf,guess_shell_compat}: Harden the process calls to account for failure Oct 8, 2024
…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.
@rjbou rjbou changed the title [2.3 backport] OpamStd.Sys.{get_terminal_columns,uname,getconf,guess_shell_compat}: Harden the process calls to account for failure [2.3 backport] System polling: Harden the process calls to account for failure Oct 9, 2024
@kit-ty-kate kit-ty-kate merged commit 99bfc6a into ocaml:2.3 Oct 9, 2024
@kit-ty-kate kit-ty-kate deleted the 2.3-openbsd-fix branch October 9, 2024 16:40
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.

2 participants