-
Notifications
You must be signed in to change notification settings - Fork 37.7k
util: Don't reference errno when pthread fails. #19194
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
Conversation
Concept ACK: nice catch and nice first-time contribution! May I ask how did you found this issue? :) Warm welcome as a contributor @miztake :) |
ACK c7601ab you can move the declaration into the if statement like this: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK c7601ab, tested on Linux Mint 19.3 (x86_64).
From the pthread_setschedparam()
docs:
On success, these functions return 0; on error, they return a nonzero error number.
It won't compile :) (at least on GCC 7.5). |
Hi, @practicalswift
Thank you for your comment. |
ACK 0e7b64b |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ACK 0e7b64b.
Mind squashing commits into one commit?
Concept ACK, checked |
Pthread library does not set errno. Pthread library's errno is returned by return value. Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
Hi, @kristapsk Thank you for your comment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
review ACK cb38b06 |
ACK cb38b06 -- patch looks correct |
Poshumous ACK, good catch! |
Pthread library does not set errno. Pthread library's errno is returned by return value. Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Github-Pull: bitcoin#19194 Rebased-From: cb38b06
2b79ac7 Clean up separated ban/discourage interface (Pieter Wuille) 0477348 Replace automatic bans with discouragement filter (Pieter Wuille) e7f06f9 test: remove Cirrus CI FreeBSD job (fanquake) eb6b82a qa: Test concurrent wallet loading (João Barbosa) c9b49d2 wallet: Handle concurrent wallet loading (João Barbosa) cf0b5a9 tests: Check that segwit inputs in psbt have both UTXO types (Andrew Chow) 3228b59 psbt: always put a non_witness_utxo and don't remove it (Andrew Chow) ed5ec30 psbt: Allow both non_witness_utxo and witness_utxo (Andrew Chow) 68e0e6f rpc: show both UTXOs in decodepsbt (Andrew Chow) 27786d0 trivial: Suggested cleanups to surrounding code (Russell Yanofsky) 654420d wallet: Minimal fix to restore conflicted transaction notifications (Russell Yanofsky) febebc4 Fix WSL file locking by using flock instead of fcntl (Samuel Dobson) 5c7151a gui: update Qt base translations for macOS release (fanquake) c219d21 build: improved output of configure for build OS (sachinkm77) 0596a6e util: Don't reference errno when pthread fails. (MIZUTA Takeshi) Pull request description: Currently backports the following to the 0.20 branch: * #18700 - Fix locking on WSL using flock instead of fcntl * #18982 - wallet: Minimal fix to restore conflicted transaction notifications * #19059 - gui: update Qt base translations for macOS release * #19152 - build: improve build OS configure output * #19194 - util: Don't reference errno when pthread fails. * #19215 - psbt: Include and allow both non_witness_utxo and witness_utxo for segwit inputs * #19219 - Replace automatic bans with discouragement filter * #19300 - wallet: Handle concurrent wallet loading ACKs for top commit: amitiuttarwar: ACK 0477348 2b79ac7 by comparing to original changes, double checking the diff sipa: utACK 2b79ac7 laanwj: ACK 2b79ac7 Tree-SHA512: e5eb31d08288fa4a6e8aba08e60b16ce1988f14f249238b1cfd18ab2c8f6fcd9f07e3c0c491d32d2361fca26e3037fb0374f37464bddcabecea29069d6737539
Pthread library does not set errno. Pthread library's errno is returned by return value. Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Github-Pull: #19194 Rebased-From: cb38b06
Pthread library does not set errno. Pthread library's errno is returned by return value. Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Github-Pull: bitcoin#19194 Rebased-From: cb38b06
Pthread library does not set errno. Pthread library's errno is returned by return value. Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Github-Pull: bitcoin#19194 Rebased-From: cb38b06
Pthread library does not set errno. Pthread library's errno is returned by return value. Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Github-Pull: bitcoin#19194 Rebased-From: cb38b06
Pthread library does not set errno. Pthread library's errno is returned by return value. Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> Github-Pull: bitcoin#19194 Rebased-From: cb38b06
9c71499 rpc: Adjust witness-tx deserialize error message (MarcoFalke) a7bdf5c rpc: Properly deserialize txs with witness before signing (MarcoFalke) 0b64310 Avoid the use of abs64 in timedata (Pieter Wuille) 5b2de04 Bump vcpkg commit ID to get new msys mirror list (Aaron Clauson) 6957419 build: set minimum required Boost to 1.48.0 (fanquake) 27bb2cc util: Don't reference errno when pthread fails. (MIZUTA Takeshi) 8bd2ab1 docs: Correct description for getblockstats's txs field (Nadav Ivgi) a8411b3 qt: Fix QFileDialog for static builds (Hennadii Stepanov) Pull request description: Backports the following to the 0.19 branch: * #19194 - util: Don't reference errno when pthread fails. - not clean. * #19536 - qt, build: Fix QFileDialog for static builds * #19777 - docs: Correct description for getblockstats's txs field * #19836 - rpc: Properly deserialize txs with witness before signing * #20095 - CI: Bump vcpkg commit ID to get new msys mirror list * #20141 - Avoid the use of abs64 in timedata * #20142 - [0.20] build: set minimum required Boost to 1.48.0 ACKs for top commit: jnewbery: utACK 9c71499 dergoegge: utACK 9c71499 MarcoFalke: ACK 9c71499 Tree-SHA512: 2151f22bc37a6a2f51a8f36c27376622016b51ff99b570e95354356fce1f1761cf19cb4f8ebfa26d38485a0bff6ff6ee834d2798fb383e2ae2abb175548b8fe6
Summary: Pthread library does not set errno. Pthread library's errno is returned by return value. Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> This is a backport of [[bitcoin/bitcoin#19194 | core#19194]] Test Plan: `ninja check-functional` Reviewers: #bitcoin_abc, deadalnix Reviewed By: #bitcoin_abc, deadalnix Differential Revision: https://reviews.bitcoinabc.org/D9524
Pthread library does not set errno.
Pthread library's errno is returned by return value.