summaryrefslogtreecommitdiffstats
path: root/xmrstak/misc
diff options
context:
space:
mode:
Diffstat (limited to 'xmrstak/misc')
-rw-r--r--xmrstak/misc/executor.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/xmrstak/misc/executor.cpp b/xmrstak/misc/executor.cpp
index 931e2aa..6f48edd 100644
--- a/xmrstak/misc/executor.cpp
+++ b/xmrstak/misc/executor.cpp
@@ -449,8 +449,26 @@ void executor::on_miner_result(size_t pool_id, job_result& oResult)
}
}
+#ifndef _WIN32
+
+#include <signal.h>
+void disable_sigpipe()
+{
+ struct sigaction sa;
+ sa.sa_handler = SIG_IGN;
+ sa.sa_flags = 0;
+ if (sigaction(SIGPIPE, &sa, 0) == -1)
+ printer::inst()->print_msg(L1, "ERROR: Call to sigaction failed!");
+}
+
+#else
+inline void disable_sigpipe() {}
+#endif
+
void executor::ex_main()
{
+ disable_sigpipe();
+
assert(1000 % iTickTime == 0);
xmrstak::miner_work oWork = xmrstak::miner_work();
OpenPOWER on IntegriCloud