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 usage of reentrant functions in ext/posix #13921

Merged
merged 1 commit into from
Apr 11, 2024

Commits on Apr 9, 2024

  1. Fix usage of reentrant functions in ext/posix

    - It's not necessarily an error of sysconf(_SC_GETPW_R_SIZE_MAX) returns -1, as
      specified by posix (and the musl implementation always returns -1). Pick an
      initial buffer size in this case.
    - Reentrant variants return an error number an may not set errno
    - Implement retry logic for ttyname_r()
    - Fix retry logic for getpwnam_r() (pw would be NULL after the first try)
    - Test retry logic by setting the initial buffer size to 1 in debug builds
    arnaud-lb committed Apr 9, 2024
    Configuration menu
    Copy the full SHA
    fb484dd View commit details
    Browse the repository at this point in the history