Sorry, I don't remember why that's there.
On Fri, Aug 19, 2011 at 2:02 PM, h.g. muller <[email protected]> wrote:
> There is something in the XBoard code I do not understand:
>
> In GameEnds() there is code to quit the engine if it is running
> under the user option -xreuse (or has requested the reuse=0
> feature by itself):
>
> if (first.reuse) {
> ** **/* Put first chess program into idle state */
> ** **if (first.pr != NoProc &&
> ** ** (gameMode == MachinePlaysWhite ||
> ** ** gameMode == MachinePlaysBlack ||
> ** ** gameMode == TwoMachinesPlay ||
> ** ** gameMode == IcsPlayingWhite ||
> ** ** gameMode == IcsPlayingBlack ||
> ** ** gameMode == BeginningOfGame)) {
> ** ** SendToProgram("force\n", &first);
> ** ** if (first.usePing) {
> ** ** char buf[MSG_SIZ];
> ** ** snprintf(buf, MSG_SIZ, "ping %d\n", ++first.lastPing);
> ** ** SendToProgram(buf, &first);
> ** ** }
> ** **}
> } else if (result != GameUnfinished || nextGameMode == IcsIdle) {
> ** **/* Kill off first chess program */
>
> Why are unfinished games excluded from terminating
> their engine process? With the current code they receive neither
> "force" not "quit", and as far as I could see, when a user starts
> a new game after this, the same engine process will receive "new"
> and keep playing. (I checked process ID with "ps l" under Linux,
> and after using "Action->Abort" on a game, and then starting a
> new one, the PID stays indeed the same.)
>
> This seems a violation of the -xreuse directive...
>