Any joker1114w Updates?

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

User avatar
hgm
Posts: 27857
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Any joker1114w Updates?

Post by hgm »

Michel wrote:Is there a way to force xboard not so send SIGINT even if the engine does
not declare sigint=0? This is useful for windows engines.
Apparently not! :shock: The engine can switch it off by printing "kibitz Hello from Crafty", but that is hardly an improvement over sending feature sigint=0... :lol:

I guess an option for this is badly needed. Arguably this silly and non-portable feature should even be switched off by default... There once has been talk if there should not be a command-line option to let the user force features as if the egine set them, so you could say -firstFeatures "sigint=0 variants="normal,nocastle"" to trickXBoard into thinking the engine said that. This could be implemented in two flavors, namely altering the default of the mentioned features, or overruling even what the engine says. Perhaps the first flavor would make more sense as a global (non-engine-specific) option, because on a known engine it would either be equivalent to forcing the option (when you know the engine does not send the feature), or it would be overruled (when it does send it). So we could have -featureDefaults for altering defaults, and -firstFeature, -secondFeature for forcing settings (processed after receiving feature done=1).

Anyway, none of this is currently implemented. Note that current XBoards are strictly speaking broken, for a combination of historic reasons and me not properly reading the specs. It sends SIGKILL in stead of SIGTERM to engines that do not promptly react to the quit command, (you can specify a delay, however) and does not pay attention to sigterm=0 for that...

Funny thing is that the (Windows) Joker source does contain the line

Code: Select all

	signal(SIGINT, SIG_IGN);
Apparently this is a no-op in a MinGW compile...

Perhaps I should make a Windows compile of the source I used to make the Linux version (which should be platform independent). This is probably a slightly more modern version (1.1.14h) than the Windows binary I spread around, as it actually is a WB v2 engine implementing setboard (the old one was v1 and did not implement setting up a position at all, but when I made a 10x8 derivative I could not do without that, as 10x8 Chess has several commonly used opening positions, and I then ported that patch back to the 8x8 version.)
Michel
Posts: 2273
Joined: Mon Sep 29, 2008 1:50 am

Re: Any joker1114w Updates?

Post by Michel »

Code: Select all

   signal(SIGINT, SIG_IGN);
Apparently this is a no-op in a MinGW compile...
No the compile is ok. I started up joker.exe in wineconsole and then it indeed ignored ctrl-C (wineconsole implements windows signals).

However if you run joker.exe in wine then wine receves the ctrl-C and quits.
One may argue whether this is the correct behaviour of wine, but that is the way it is.
User avatar
hgm
Posts: 27857
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Any joker1114w Updates?

Post by hgm »

Indeed, it seems a wine bug. Currently I always let my engines request sigint=0, rather than making them insensitive to SIGINT, because I find it extremely annoying when you cannot Ctrl-C them from the command line.
User avatar
hgm
Posts: 27857
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Any joker1114w Updates?

Post by hgm »

OK, with the latest version in the hgmaster branch of the hgm.nubati.net repository, the (persistent) option -featureDefaults "sigint=0" should make XBoard refrain from using SIGINT unless the engine explicitly requests it through feature sigint=1. To suppress it even in that case you can use -firstFeatures "sigint=0" (a volatile option).

This should work with an arbitrary list of features, but including done=... or option="..." will have (currently pretty bad) undefined effects.
Michel
Posts: 2273
Joined: Mon Sep 29, 2008 1:50 am

Re: Any joker1114w Updates?

Post by Michel »

Thanks very much!

Michel