diff --git a/src/main.cpp b/src/main.cpp index cbdeb0994..b202cd6ad 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -29,6 +29,7 @@ #include #include +#include #include #include @@ -39,6 +40,10 @@ int main(int argc, const char** argv) { int status{0}; + // Ignore SIGPIPE from writes to network sockets after the remote end has hung + // up. Rust code expects this, and the Rust runtime ignores this signal at startup. + signal(SIGPIPE, SIG_IGN); + Context globalContext; Context::setContext(&globalContext);