From a17e06ad28da6e1c9718ddebebf4594a4313fb0f Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Mon, 16 May 2011 11:02:08 +0200 Subject: [PATCH] Make engine startup failure non-fatal in WinBoard Unlike XBoard, which forks first, the parent process WinBoard has direct knowledge of a failure to execute the engine command, and used it to trigger a fatal error. The code doing this has now been disabled. Only in case of a first engine we switch back to -ncp mode in stead, but no action is taken to 'bury' the deceased engine process. Like in XBoard, errors in writing or reading the pipes will trigger this. --- backend.c | 11 ++++++++--- 1 files changed, 8 insertions(+), 3 deletions(-) diff --git a/backend.c b/backend.c index e56bbb1..508ddf7 100644 --- a/backend.c +++ b/backend.c @@ -9477,9 +9477,14 @@ StartChessProgram(cps) if (err != 0) { snprintf(buf, MSG_SIZ, _("Startup failure on '%s'"), cps->program); - DisplayFatalError(buf, err, 1); - cps->pr = NoProc; - cps->isr = NULL; + DisplayError(buf, err); // [HGM] bit of a rough kludge: ignore failure, (which XBoard would do anyway), and let I/O discover it + if(cps != &first) return; + appData.noChessProgram = TRUE; + ThawUI(); + SetNCPMode(); +// DisplayFatalError(buf, err, 1); +// cps->pr = NoProc; +// cps->isr = NULL; return; } -- 1.7.0.4