We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f711f7d commit 9fa40f7Copy full SHA for 9fa40f7
cmd/csppsolver/solver.go
@@ -4,6 +4,8 @@ import (
4
"math/big"
5
"net/rpc"
6
"os"
7
+ "os/signal"
8
+ "syscall"
9
10
"decred.org/cspp/v2/solver"
11
)
@@ -72,6 +74,13 @@ func (*Solver) Roots(args Args, res *Result) error {
72
74
}
73
75
76
func main() {
77
+ // Ignore SIGINT and other clean shutdown signals (and Windows
78
+ // equivalents). When csppsolver is in the same process group as
79
+ // dcrwallet, it must continue running for any ongoing mixes even
80
+ // after shutdown is signaled. It will eventually exit later after
81
+ // the stdin pipe is closed.
82
+ signal.Ignore(os.Interrupt, syscall.SIGTERM, syscall.SIGHUP)
83
+
84
s := rpc.NewServer()
85
err := s.Register(new(Solver))
86
if err != nil {
0 commit comments