diff options
author | Tom Smeding <tom.smeding@gmail.com> | 2018-09-17 22:59:09 +0200 |
---|---|---|
committer | Tom Smeding <tom.smeding@gmail.com> | 2018-09-17 22:59:09 +0200 |
commit | b9fe622b6f3b3a0abba1eee0d71285c7329c89d2 (patch) | |
tree | edc38ddda352775f14f51cba4625fc5f66de6b03 | |
parent | fca6e0750b83f337c61b994a191b8463585ea655 (diff) |
Catch SIGPIPE to prevent spurious exiting
-rw-r--r-- | main.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -15,6 +15,7 @@ #include <cassert> #include <errno.h> #include <unistd.h> +#include <signal.h> #include <sys/stat.h> #include <sys/time.h> #include "scheduler.h" @@ -360,6 +361,8 @@ int main(int argc, char **argv) { mkdirp(playerlogdir); mkdirp(gamelogdir); + signal(SIGPIPE, [](int){}); + Scheduler scheduler(num_threads); fullCompetition(scheduler, players, params); scheduler.finish(); |