Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Windows and pipes

Author: Fabien Letouzey

Date: 01:57:33 04/15/04

Go up one level in this thread


On April 14, 2004 at 15:52:12, Dieter Buerssner wrote:

>On April 14, 2004 at 08:08:37, Fabien Letouzey wrote:
>
>>>Same behavior with Yace and Fruit, nothing happens until I press return.
>
>>Quite clearly the behaviour on Windows is too strange for me to think about.
>>I can't help you at all, I am afraid (and can't help myself either in the
>>process).
>
>I think, this is the expected behaviour. stdin is typically line buffered, so it
>will need a return (at least, when typing into the console). Your suggestion
>about checking the return value of (for example) fgets() is still good, and will
>work in typical situations, where the GUI crashes. Under Unix and under Windows.
>Another (better?) way to check wether the engine does this, may be to redirect
>input.

That would be a somewhat rational explanation, but I don't use any input
buffering (as most engine authors).  Also PolyGlot has the same problem although
I don't use stdio at all.  It does not react to ^Z (it does react to ^D on Unix
though, and so do all engines who test for EOF).
In other words I don't know how to send EOF in a Windows command line.

>Have a file with a single line
>
>xboard

>Say x.inp. Run engine < x.inp. An even better test might be, to not have a line
>at all - just the word xboard without newline.

Yes if one can't test using console mode, well then we need to find another way.
 In Unix it never matters whether one uses the console, a regular file, pipe,
socket, etc...

Fabien.




This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.