appData.remoteUser, appData.telnetProgram,
appData.icsHost, appData.icsPort);
}
- return StartChildProcess(buf, "", &icsPR);
+ return StartChildProcess(buf, "", &icsPR, 0);
}
} else if (appData.useTelnet) {
cps->initDone = FALSE;
if (strcmp(cps->host, "localhost") == 0) {
- err = StartChildProcess(cps->program, cps->dir, &cps->pr);
+ err = StartChildProcess(cps->program, cps->dir, &cps->pr, appData.niceEngines);
} else if (*appData.remoteShell == NULLCHAR) {
err = OpenRcmd(cps->host, appData.remoteUser, cps->program, &cps->pr);
} else {
snprintf(buf, sizeof(buf), "%s %s -l %s %s", appData.remoteShell,
cps->host, appData.remoteUser, cps->program);
}
- err = StartChildProcess(buf, "", &cps->pr);
+ err = StartChildProcess(buf, "", &cps->pr, appData.niceEngines);
}
if (err != 0) {
int RightClick P((ClickType c, int x, int y, int *col, int *row));
void Wheel P((int dir, int x, int y));
-int StartChildProcess P((char *cmdLine, char *dir, ProcRef *pr));
+int StartChildProcess P((char *cmdLine, char *dir, ProcRef *pr, int priority));
void DestroyChildProcess P((ProcRef pr, int/*boolean*/ signal));
void InterruptChildProcess P((ProcRef pr));
char *BufferCommandOutput P((char *command, int size));
int
-StartChildProcess (char *cmdLine, char *dir, ProcRef *pr)
+StartChildProcess (char *cmdLine, char *dir, ProcRef *pr, int priority)
{
char *argv[64], *p;
int i, pid;
exit(1);
}
- nice(appData.niceEngines); // [HGM] nice: adjust priority of engine proc
+ nice(priority); // [HGM] nice: adjust priority of engine proc
execvp(argv[0], argv);
} else {
snprintf(cmdLine, sizeof(cmdLine), "%s %s %s", appData.telnetProgram, host, port);
}
- return StartChildProcess(cmdLine, "", pr);
+ return StartChildProcess(cmdLine, "", pr, 0);
}
int
return PM_WSG;\r
case WhiteLance:\r
\r
+\r
return PM_WL;\r
case WhiteFalcon:\r
return PM_WV;\r
later.\r
*/\r
int\r
-StartChildProcess(char *cmdLine, char *dir, ProcRef *pr)\r
+StartChildProcess(char *cmdLine, char *dir, ProcRef *pr, int priority)\r
{\r
#define BUFSIZE 4096\r
\r
\r
if (appData.niceEngines){ // [HGM] nice: adjust engine proc priority\r
if(appData.debugMode) fprintf(debugFP, "nice engine proc to %d\n", appData.niceEngines);\r
- SetPriorityClass(piProcInfo.hProcess, GetWin32Priority(appData.niceEngines));\r
+ SetPriorityClass(piProcInfo.hProcess, GetWin32Priority(priority));\r
}\r
\r
/* Close the handles we don't need in the parent */\r
} else {\r
snprintf(cmdLine, MSG_SIZ, "%s %s %s", appData.telnetProgram, host, port);\r
}\r
- return StartChildProcess(cmdLine, "", pr);\r
+ return StartChildProcess(cmdLine, "", pr, 0);\r
}\r
\r
\r