diff options
Diffstat (limited to 'test/bench_network.cpp')
-rw-r--r-- | test/bench_network.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/bench_network.cpp b/test/bench_network.cpp index 1021ec4..1d52c39 100644 --- a/test/bench_network.cpp +++ b/test/bench_network.cpp @@ -130,6 +130,13 @@ salticidae::EventContext ec; NetAddr alice_addr("127.0.0.1:1234"); NetAddr bob_addr("127.0.0.1:1235"); +void masksigs() { + sigset_t mask; + sigemptyset(&mask); + sigfillset(&mask); + pthread_sigmask(SIG_BLOCK, &mask, NULL); +} + int main() { salticidae::BoxObj<MyNet> alice = new MyNet(ec, "Alice", 10); alice->start(); @@ -137,6 +144,7 @@ int main() { salticidae::EventContext tec; MyNet bob(tec, "Bob"); std::thread bob_thread([&]() { + masksigs(); bob.start(); bob.connect(alice_addr); tec.dispatch(); |