[Top][All Lists]

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

Re: [gnugo-devel] Using pipes for the GTP mode

From: Gunnar Farnebäck
Subject: Re: [gnugo-devel] Using pipes for the GTP mode
Date: Tue, 30 Sep 2008 17:14:33 +0200
User-agent: Mozilla-Thunderbird (X11/20080724)

Jorge Timón wrote:
> I readed some old mails in the mailing list. Now i know what i need is
> pipes. I found some examples
> (
> I think that's too complex for me: i just need a little example in wich
> "gnugo --mode gtp" is runned, a command is sent to it and the response
> is received (from a piece of code, not the shell). Maybe i should read
> more about pipes before asking this, but there are various types of
> pipes, aren't there? If i'm asking for too much and i have to learn that
> on my own, just tell me.

Establishing pipes from C code is unavoidably somewhat unpleasant, I'm
afraid, but there are probably good tutorials to find somewhere on the

There is a trick on unix (including linux but unsure about cygwin) to
avoid this at the expense of having the unpleasantness moved to the
time of running the code. Just write your code talking GTP via
stdin/stdout. Then run the program in this way:

mkfifo pipe
gnugo --mode gtp < pipe | ./your_program > pipe


reply via email to

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