- Change initializeResult(int) to initializeResult(bool) to avoid implicit type conversion.
- Use EXIT_FAILURE and EXIT_SUCCESS instead of magic numbers.
- Remove the argument from shutdownResult(int); it was called with a constant argument.
qt: clean up initialize/shutdown signals #9834
pull benma wants to merge 1 commits into bitcoin:master from benma:exitcode changing 1 files +14 −15-
benma commented at 8:25 AM on February 23, 2017: none
-
5b528d746c
qt: clean up initialize/shutdown signals
- Change initializeResult(int) to initializeResult(bool) to avoid implicit type conversion. - Use EXIT_FAILURE and EXIT_SUCCESS instead of magic numbers. - Remove the argument from shutdownResult(int); it was called with a constant argument.
-
laanwj commented at 8:29 AM on February 23, 2017: member
it was called with a constant argument.
That seems like a bug. It should be called with 0 in case of an error. Though I guess shutdown can't really fail (without crashing).
-
benma commented at 8:35 AM on February 23, 2017: none
It emits a different signal in that case:
runawayException, which callsexit(EXIT_FAILURE)instead of QT'squit(). - jonasschnelli added the label GUI on Feb 23, 2017
-
laanwj commented at 9:41 AM on February 23, 2017: member
Yes, indeed.
-
benma commented at 6:08 AM on February 28, 2017: none
@jonasschnelli could you please review this?
-
in src/qt/bitcoin.cpp:None in 5b528d746c
301 | @@ -302,7 +302,7 @@ void BitcoinCore::shutdown() 302 | threadGroup.join_all(); 303 | Shutdown(); 304 | qDebug() << __func__ << ": Shutdown finished"; 305 | - Q_EMIT shutdownResult(1);
jonasschnelli commented at 9:45 AM on February 28, 2017:Agree with @laanwj: This was a bug.
benma commented at 1:31 AM on March 1, 2017:Was a bug, or is a bug? Because it is still not called with (0), and I am not sure under what circumstances it should be, seeing that the runaway exception signal is called when shutdown fails.
jonasschnelli commented at 12:15 PM on March 1, 2017:The int return value was only use over qDebug which we can argue what it should have been there. But this PRs solution (remove the shutdown result value) seems to make most sense.
jonasschnelli commented at 9:48 AM on February 28, 2017: contributorTested ACK 5b528d746c841aa868a305f9c1a586f539b531cb
MarcoFalke commented at 10:20 AM on February 28, 2017: memberutACK 5b528d746c841aa868a305f9c1a586f539b531cb
jonasschnelli merged this on Mar 2, 2017jonasschnelli closed this on Mar 2, 2017jonasschnelli referenced this in commit b00ba6251f on Mar 2, 2017benma commented at 9:33 AM on March 2, 2017: noneThanks everyone for the reviews and merge! :dancing_men:
PastaPastaPasta referenced this in commit 73a42dadcd on Dec 28, 2018PastaPastaPasta referenced this in commit b5066f8db8 on Dec 29, 2018PastaPastaPasta referenced this in commit ad4754e04b on Dec 29, 2018PastaPastaPasta referenced this in commit f477703a9e on Dec 29, 2018PastaPastaPasta referenced this in commit 54b88b5751 on Dec 29, 2018PastaPastaPasta referenced this in commit 832f0c55be on Dec 31, 2018PastaPastaPasta referenced this in commit a9577bb028 on Dec 31, 2018PastaPastaPasta referenced this in commit dc9774886d on Jan 2, 2019PastaPastaPasta referenced this in commit fd24c03a95 on Jan 2, 2019PastaPastaPasta referenced this in commit 8710e6c9fc on Jan 3, 2019PastaPastaPasta referenced this in commit e85779671d on Jan 3, 2019PastaPastaPasta referenced this in commit 36be5f379f on Jan 5, 2019PastaPastaPasta referenced this in commit 0201b3dbd8 on Jan 5, 2019PastaPastaPasta referenced this in commit adf13960eb on Jan 7, 2019PastaPastaPasta referenced this in commit 63d22e5a4b on Jan 7, 2019PastaPastaPasta referenced this in commit 24e090a45b on Jan 7, 2019PastaPastaPasta referenced this in commit 10eb1c5a24 on Jan 7, 2019PastaPastaPasta referenced this in commit 904e56fb11 on Jan 23, 2019PastaPastaPasta referenced this in commit 8035769d47 on Jan 23, 2019PastaPastaPasta referenced this in commit 03329761db on Jan 25, 2019PastaPastaPasta referenced this in commit f525eb246b on Jan 25, 20192a5A1Ghu1 referenced this in commit 469679b54f on Oct 18, 2020squidicuzz referenced this in commit f57568d969 on Oct 28, 20202a5A1Ghu1 referenced this in commit 6b1fc78c6a on Oct 28, 20202a5A1Ghu1 referenced this in commit 92b8b6e212 on Oct 28, 20202a5A1Ghu1 referenced this in commit 1e0217eefd on Nov 2, 2020MarcoFalke locked this on Sep 8, 2021ContributorsLabels
This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-22 06:15 UTC
More mirrored repositories can be found on mirror.b10c.me