fix error handling for pthread_sigmask(3)#93530
Conversation
Errors from pthread_sigmask(3) were handled using cvt(), which expects a return value of -1 on error and uses errno. However, pthread_sigmask(3) returns 0 on success and an error number otherwise. Fix it by replacing cvt() with cvt_nz().
|
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @kennytm (or someone else) soon. Please see the contribution instructions for more information. |
|
Good catch, thanks! |
|
📌 Commit c492355 has been approved by |
|
💡 This pull request was already approved, no need to approve it again.
|
|
📌 Commit c492355 has been approved by |
…nytm fix error handling for pthread_sigmask(3) Errors from `pthread_sigmask(3)` were handled using `cvt()`, which expects a return value of `-1` on error and uses `errno`. However, `pthread_sigmask(3)` returns `0` on success and an error number otherwise. Fix it by replacing `cvt()` with `cvt_nz()`.
|
Failed in #96075 (comment) |
|
@anonion0 Could you move these imports under cfgs? |
|
Should be fixed now. |
|
Thanks! |
|
📌 Commit e6aafbc has been approved by |
…nTitor fix error handling for pthread_sigmask(3) Errors from `pthread_sigmask(3)` were handled using `cvt()`, which expects a return value of `-1` on error and uses `errno`. However, `pthread_sigmask(3)` returns `0` on success and an error number otherwise. Fix it by replacing `cvt()` with `cvt_nz()`.
|
☀️ Test successful - checks-actions |
|
Finished benchmarking commit (e27d9df): comparison url. Summary:
If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression Footnotes |
Errors from
pthread_sigmask(3)were handled usingcvt(), which expects a return value of-1on error and useserrno.However,
pthread_sigmask(3)returns0on success and an error number otherwise.Fix it by replacing
cvt()withcvt_nz().