No description provided.
[Qt] Remove shutdown poll timer and replace it with a signal #10254
pull jonasschnelli wants to merge 3 commits into bitcoin:master from jonasschnelli:2017/04/qt_shutdown changing 4 files +15 −9-
jonasschnelli commented at 8:00 PM on April 21, 2017: contributor
-
Add ShutdownRequested signal 0c0aafe1a1
-
[Qt] Replace shutdown detection poll timer with signal listener 9c74b5fe40
- jonasschnelli added the label GUI on Apr 21, 2017
- jonasschnelli requested review from laanwj on Apr 21, 2017
- jonasschnelli removed review request from laanwj on Apr 21, 2017
-
laanwj commented at 7:46 AM on April 22, 2017: member
I think we need to keep the polling-based path as well, to handle UNIX signals?
-
Respect shutdown signal when handling SIGTERM 3a473402b1
-
jonasschnelli commented at 8:00 AM on April 22, 2017: contributor
I think we need to keep the polling-based path as well, to handle UNIX signals?
Not sure. Just added a commit that calls
StartShutdown()(instead offRequestShutdown = true;). I guess this should work? -
in src/init.cpp:277 in 3a473402b1
273 | @@ -273,7 +274,7 @@ void Shutdown() 274 | */ 275 | static void HandleSIGTERM(int) 276 | { 277 | - fRequestShutdown = true; 278 | + StartShutdown();
laanwj commented at 8:02 AM on April 22, 2017:This is not a good idea, UNIX signal handlers are extremely limited in what they can do. Basically:
- Set atomic flags
- Send to/receive from pipe
This is why the polling was kept in #10125. It is there in addition to notification-based user initiated shutdown.
jonasschnelli commented at 7:38 PM on April 22, 2017: contributorI wasn't aware of the async-signal-safe limitations. This seems indeed not simply solvable by a signal. Closing.
jonasschnelli closed this on Apr 22, 2017DrahtBot locked this on Sep 8, 2021ContributorsLabels
github-metadata-mirror
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-21 18:15 UTC
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-21 18:15 UTC
This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me
More mirrored repositories can be found on mirror.b10c.me