bug-xboard
[Top][All Lists]
Advanced

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

Re: [Bug-XBoard] Question on Winboard interface


From: Tim Mann
Subject: Re: [Bug-XBoard] Question on Winboard interface
Date: Mon, 15 Dec 2003 22:28:45 -0800

Instead of just that summary, could you please send a winboard.debug
file showing this problem actually happening?  Also, I have a question,
see below.

On Mon, 15 Dec 2003 23:20:09 +0100, Gijsbert Wiesenekker <address@hidden> wrote:
> Hi Tim,
> 
> I have recently added a Winboard/Xboard interface to my chess program, 
> and I have run into a timing problem that seems to be caused by the fact 
> that Winboard exits 'too soon' if you use the /exit option.
> I can illustrate the problem as follows. I have two versions of my chess 
> program, Z1 and Z2:
> 
> Z1: sends move to Winboard
> Z1: sees that it is won/lost/draw
> Z1: sends claim to Winboard
> Z1: waits for quit
> Winboard: gets move from Z1
> Winboard: passes move on to Z2
>     Z2: gets move from Winboard
>     Z2: sees that it is won/lost/draw
>     Z2: sends claim to Winboard
>     Z2: waits for quit
> Winboard: gets claim from Z1.
> Sends quit to Z1 and Z2, exits, en does not seem to listen to Z2 any 
> more, because Z2 hangs in trying to send the claim to Winboard.

What is making Z2 hang?  Are you saying that if the engine sends
something to WinBoard after WinBoard has exited, the engine hangs?  That
is not supposed to happen with pipes; if you write on a pipe with no one
to read it, you should get an error back.

> 
> So if you do the following:
> 
> Z1: sends move to Winboard
> Z1: sees that it is a draw by rep
> Z1: WAIT HERE FOR 5 SECONDS
> Z1: sends claim to Winboard
> Z1: waits for quit
> Winboard: gets move from Z1 (meanwhile Z1 is waiting for 5 seconds)
> Winboard: sends move to Z2
>     Z2: gets move from Winboard
>     Z2: sees that it is won/lost/draw
>     Z2: sends claim to Winboard
>     Z2: waits for quit
> Winboard: now gets claim from Z2 (Z2 answers before Z1 because Z1 is 
> waiting for 5 seconds)
> Sends quit to Z1 and Z2, exits, and does not seem to listen to Z1 any 
> more, because now Z1 hangs in trying to send the claim to Winboard.
> 
> Reading any pending messages from Winboard before sending the claim 
> alleviates the problem:
> 
> Z1: sends move to Winboard
> Z1: sees that it is a draw by rep
> Z1: CHECK FOR ANY PENDING MESSAGES INCLUDING QUIT
> Z1: sends claim to Winboard
> Z1: waits for quit
> Same for Z2.
> 
> But still the problem could occur between the step 3 and 4 (and indeed 
> it already happened).
> If you do not use the /exit option the problem does not occur (both 
> claims from both programs are processed by Winboard), so it looks like 
> Winboard exits 'too soon'.
> Questions: has anyone else reported this timing problem? What would be 
> the best way to deal with it?
> 
> Regards,
> Gijsbert
> 
> 
> 
> 
> 
> _______________________________________________
> Bug-XBoard mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/bug-xboard
> 


-- 
Tim Mann  address@hidden  http://tim-mann.org/




reply via email to

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