bug-xboard
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-XBoard] Infinite recursion


From: h.g. muller
Subject: Re: [Bug-XBoard] Infinite recursion
Date: Thu, 12 Apr 2012 10:54:26 +0100


If Xboard is dependent on untranslated error messages from libc, it should run the engines in the C locale. It can be done by calling putenv("LANGUAGE=C") in the child proces before the exec() call.

It is not that simple. One would want the engines to run in the same locale as XBoard, in order to get translation of the engine-defined options in the Engine Settings dialogs. The libc messages that are recognized by XBoard are supposed to come from intermediaries like ssh, which you typically use when you run the engines on a remote machine (using -firstHost, -secondHost). This is needed because such interediaries might not exit when they fail to execute the engine binary. The engine itself, when run locally, can inform XBoard of its failure to start by simply quitting. Failure to exectute the engine is announced by XBoard to itself (i.e. from the child process to the main process through the pipe) using perror(), which presumably would use the current locale. So perhaps we should make the child switch to the C locale after exec failure, before using perror(). Is that possible?

If the engine really runs on a remote machine, I don't think it would pay attention to any environment variables on the local one. Or would it?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]