From 4664f1be975afb2add547ef8bf344e153f210400 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Tue, 13 Mar 2012 21:46:55 +0100 Subject: [PATCH] More thorough switch to -ncp on engine failure The ProcRef and InputSource are now also cleared, and just to be sure there are no surviving adapters, the child is killed when engine startup fails. --- backend.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/backend.c b/backend.c index b1d35a9..726b2d3 100644 --- a/backend.c +++ b/backend.c @@ -8378,6 +8378,9 @@ if(appData.debugMode) fprintf(debugFP, "nodes = %d, %lld\n", (int) programStats. _(cps->which), cps->program, cps->host, message); RemoveInputSource(cps->isr); if(appData.icsActive) DisplayFatalError(buf1, 0, 1); else { + cps->isr = NULL; + DestroyChildProcess(cps->pr, 9 ); // just to be sure + cps->pr = NoProc; if(cps == &first) { appData.noChessProgram = TRUE; gameMode = MachinePlaysBlack; ModeHighlight(); // kludge to unmark Machine Black menu -- 1.7.0.4