When we get an EOF signal from the GUI pipe, meaning that the GUI
died without sending a 'quit' command, we'd better shutdown the engine
before exiting ourself.
nomove:\r
fflush(toE); fflush(stdout);\r
i = 0; while((x = getchar()) != EOF && (line[i] = x) != '\n') i++;\r
- line[++i] = 0; if(x == EOF) { printf("# EOF\n"); exit(-1); }\r
+ line[++i] = 0; if(x == EOF) { printf("# EOF\n"); fprintf(toE, "quit\n"); exit(-1); }\r
sscanf(line, "%s", command);\r
if(!strcmp(command, "new")) {\r
computer = BLACK; moveNr = 0; depth = -1; move[0][0] = 0;\r