Commit 2160995
committed
ipc: Add Ctrl-C handler for spawned subprocesses
This fixes an error reported by Antoine Poinsot <[email protected]> in
bitcoin-core/libmultiprocess#123 that does not happen
in master, but does happen with bitcoin/bitcoin#10102
applied, where if Ctrl-C is pressed when `bitcoin-node` is started, it is
handled by both `bitcoin-node` and `bitcoin-wallet` processes, causing the
wallet to shutdown abruptly instead of waiting for the node and shutting down
cleanly.
This change fixes the problem by having the wallet process print to stdout when
it receives a Ctrl-C signal but not otherwise react, letting the node shut
everything down cleanly.1 parent 0c28068 commit 2160995
1 file changed
+24
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
16 | 17 | | |
17 | 18 | | |
18 | 19 | | |
| |||
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
29 | 52 | | |
30 | 53 | | |
31 | 54 | | |
| |||
53 | 76 | | |
54 | 77 | | |
55 | 78 | | |
| 79 | + | |
56 | 80 | | |
57 | 81 | | |
58 | 82 | | |
| |||
0 commit comments