Branch: refs/heads/master
  Home:   https://github.com/conformal/btcd
  Commit: 1aa65e6863513b29c1fa4ef02b52b8ad7af10e05
      
https://github.com/conformal/btcd/commit/1aa65e6863513b29c1fa4ef02b52b8ad7af10e05
  Author: Dave Collins <[email protected]>
  Date:   2013-10-26 (Sat, 26 Oct 2013)

  Changed paths:
    M btcd.go
    M signal.go

  Log Message:
  -----------
  Correct and improve SIGINT (Ctrl+C) handling.

Since the main SIGINT handler is running as a goroutine, the main
goroutine must be kept active long enough for it to finish or it will be
nuked when the main goroutine exits.  This commit makes that happen by
slightly modifying how it waits for shutdown.

Rather than having the main goroutine only wait for the server to
shutdown, there is now a shutdown channel that is used to signal the main
goroutine to shutdown for all cases such as a graceful shutdown, a
scheduled shutdown, an RPC stop, or a SIGINT.

While here, also add a few prints to indicate a SIGINT was received and
the shutdown progress.



Reply via email to