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

Improve error printing in process_posix.rs #85

Merged
merged 1 commit into from
Oct 6, 2023
Merged

Improve error printing in process_posix.rs #85

merged 1 commit into from
Oct 6, 2023

Commits on Oct 6, 2023

  1. Improve error printing in process_posix.rs

    * The posix_spawn_* family of functions returns != 0 on error,
      and the return is an error code that can be passed to strerror().
      So check for `!= 0`, not `< 0`. (Error codes that can be passed
      to strerror() are in practice > 0!) Rename `check_posix` to
      `check_posix_spawn` too, to make it clear it's only for checking
      return codes from functions in the posix_spawn_* family.
    
    * The normal C runtime functions return a code < 0 on error, and
      put the error code in errno. Add a check_ret_errno function and
      call that instead of check_posix for non-spawn functions.
    nico committed Oct 6, 2023
    Configuration menu
    Copy the full SHA
    357049f View commit details
    Browse the repository at this point in the history