not enough signal handlers on win32

pull/36/head
despair 6 years ago
parent 3aaea187b6
commit e5ef2cdd27

@ -1,6 +1,8 @@
#include <libabyss.hpp>
#include <llarp/net.hpp>
#ifndef _WIN32
#include <sys/signal.h>
#endif
struct DemoHandler : public abyss::http::IRPCHandler
{
@ -34,7 +36,12 @@ struct DemoServer : public abyss::http::BaseReqHandler
int
main(int argc, char* argv[])
{
// Ignore on Windows, we don't even get SIGPIPE (even though native *and*
// emulated UNIX pipes exist - CreatePipe(2), pipe(3))
// Microsoft libc only covers six signals
#ifndef _WIN32
signal(SIGPIPE, SIG_IGN);
#endif
llarp_threadpool* threadpool = llarp_init_same_process_threadpool();
llarp_ev_loop* loop = nullptr;
llarp_ev_loop_alloc(&loop);

Loading…
Cancel
Save