Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

appbase: Block (queue) exit signals during shutdown #6814

Merged
merged 1 commit into from
Feb 23, 2019

Commits on Feb 22, 2019

  1. appbase: Block (queue) exit signals during shutdown

    When a shutdown signal is handled the sig_set is 1) canceled and 2) destroyed. This means that signals are no longer handled by boost::asio and revert back to default behavior. If someone accidentally hits ctrl-c a second time during a long shutdown they run the risk of leaving the database dirty as that second ctrl-c will be insta-kill.
    
    This patch changes the behavior and keeps the sig_set active forever. This means that even after the first handled async_wait() on the sig_set (that starts an appbase quit), additional signals in the set are effectively “blocked” (not posix blocked, but blocked in the sense they are consumed and queued by the sig_set that is not being async_wait()ed on)
    spoonincode committed Feb 22, 2019
    Configuration menu
    Copy the full SHA
    6261f53 View commit details
    Browse the repository at this point in the history