SIGINT is unfortunately part of the protocol inherited from gnuchess4,
and is used by xboard as such. So this was not a proper fix for the
original issue.
This reverts commit
00e10bc4a760150665436b17c50abf264f28d435,
"Don't intercept INT and QUIT signals, and use USR1 instead of QUIT for".
#endif
}
- signal(SIGUSR1, TerminateSearch);
+ signal(SIGINT, TerminateSearch);
}
if (XSHOGI)
{
- signal(SIGUSR1, TerminateSearch);
+ signal(SIGINT, TerminateSearch);
TCmoves = 40;
TCminutes = 5;
TimeControl.moves[black], TimeControl.clock[black] / 100,
TCadd/100, MaxSearchDepth);
- signal(SIGUSR1, Raw_TerminateSearch);
+ signal(SIGINT, Raw_TerminateSearch);
+ signal(SIGQUIT, Raw_TerminateSearch);
}
void
Raw_SearchStartStuff(short side)
{
- signal(SIGUSR1, Raw_TerminateSearch);
+ signal(SIGINT, Raw_TerminateSearch);
+ signal(SIGQUIT, Raw_TerminateSearch);
if (flag.post)
{
/* CHECKME: does this work?
- * This routine sends a SIGUSR1 to gnushogi to awaken it
+ * This routine sends a SIGINT (^C interrupt) to gnushogi to awaken it
* if it might be busy thinking on our time. This normally isn't needed,
* but is useful on systems where the FIONREAD ioctl doesn't work since
* on those systems the gnushogi feature that lets you interrupt its thinking
{
if (xshogiDebug || localPlayer.appData.debugMode)
{
- fprintf(stderr, "Sending SIGUSR1 to %s\n",
+ fprintf(stderr, "Sending SIGINT to %s\n",
((pid == firstProgramPID) ? "first" : "second"));
}
- (void)kill(pid, SIGUSR1); /* stop it thinking */
+ (void)kill(pid, SIGINT); /* stop it thinking */
}
break;