aboutsummaryrefslogtreecommitdiff
path: root/test/test_p2p_tls.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_p2p_tls.cpp')
-rw-r--r--test/test_p2p_tls.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/test_p2p_tls.cpp b/test/test_p2p_tls.cpp
index 698bbac..93cefac 100644
--- a/test/test_p2p_tls.cpp
+++ b/test/test_p2p_tls.cpp
@@ -29,6 +29,7 @@
#include <unordered_map>
#include <unordered_set>
#include <unistd.h>
+#include <signal.h>
#include "salticidae/msg.h"
#include "salticidae/event.h"
@@ -69,6 +70,13 @@ struct MsgText {
const uint8_t MsgText::opcode;
+void masksigs() {
+ sigset_t mask;
+ sigemptyset(&mask);
+ sigfillset(&mask);
+ pthread_sigmask(SIG_BLOCK, &mask, NULL);
+}
+
std::unordered_set<uint256_t> valid_certs;
struct Net {
@@ -124,6 +132,7 @@ struct Net {
this->id, std::string(claimed_addr).c_str());
});
th = std::thread([=](){
+ masksigs();
try {
net->start();
net->listen(NetAddr(listen_addr));