From: H.G.Muller Date: Wed, 29 Oct 2014 21:43:46 +0000 (+0100) Subject: Make UCI2WB resistent to SIGTERM in Linux X-Git-Tag: v2.0~7 X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=8fa58cb5e2b3452a9baa92ce046ec92b5fd55960;p=uci2wb.git Make UCI2WB resistent to SIGTERM in Linux UCI2WB was already resistant to SIGINT, which XBoard sends with every usermove, but must also ignore the SIGTERM that is sent with the quit command in order to reliably relay this quit to the engine. --- diff --git a/UCI2WB.c b/UCI2WB.c index 53d130f..7aaad84 100644 --- a/UCI2WB.c +++ b/UCI2WB.c @@ -604,7 +604,7 @@ main(int argc, char **argv) #ifdef WIN32 CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE) Engine2GUI, (LPVOID) NULL, 0, &thread_id); #else - { pthread_t t; signal(SIGINT, SIG_IGN); pthread_create(&t, NULL, Engine2GUI, NULL); } + { pthread_t t; signal(SIGINT, SIG_IGN); signal(SIGTERM, SIG_IGN); pthread_create(&t, NULL, Engine2GUI, NULL); } #endif // handle GUI->engine traffic in original thread