Removed signal handlers from bitcoind.
- when using bitcoin as a shared lib, there should not be any need for bitcoind to be handling its own signals.
This commit is contained in:
parent
db65d6476f
commit
f4a1f7b12a
|
@ -280,6 +280,32 @@ index cce687a..0f162ff 100644
|
|||
return (AppInit(argc, argv) ? 0 : 1);
|
||||
}
|
||||
+#endif
|
||||
diff --git a/src/init.cpp b/src/init.cpp
|
||||
index d127d55..fafd4fd 100644
|
||||
--- a/src/init.cpp
|
||||
+++ b/src/init.cpp
|
||||
@@ -638,21 +638,6 @@ bool AppInit2(boost::thread_group& threadGroup, CScheduler& scheduler)
|
||||
umask(077);
|
||||
}
|
||||
|
||||
- // Clean shutdown on SIGTERM
|
||||
- struct sigaction sa;
|
||||
- sa.sa_handler = HandleSIGTERM;
|
||||
- sigemptyset(&sa.sa_mask);
|
||||
- sa.sa_flags = 0;
|
||||
- sigaction(SIGTERM, &sa, NULL);
|
||||
- sigaction(SIGINT, &sa, NULL);
|
||||
-
|
||||
- // Reopen debug.log on SIGHUP
|
||||
- struct sigaction sa_hup;
|
||||
- sa_hup.sa_handler = HandleSIGHUP;
|
||||
- sigemptyset(&sa_hup.sa_mask);
|
||||
- sa_hup.sa_flags = 0;
|
||||
- sigaction(SIGHUP, &sa_hup, NULL);
|
||||
-
|
||||
#if defined (__SVR4) && defined (__sun)
|
||||
// ignore SIGPIPE on Solaris
|
||||
signal(SIGPIPE, SIG_IGN);
|
||||
diff --git a/src/init.h b/src/init.h
|
||||
index dcb2b29..5ce68ba 100644
|
||||
--- a/src/init.h
|
||||
|
|
|
@ -676,12 +676,6 @@ start_node(void) {
|
|||
noui_connect();
|
||||
|
||||
new boost::thread(boost::bind(&start_node_thread));
|
||||
|
||||
// Drop the bitcoind signal handlers: we want our own.
|
||||
signal(SIGINT, SIG_DFL);
|
||||
signal(SIGHUP, SIG_DFL);
|
||||
signal(SIGQUIT, SIG_DFL);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue