-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Peng Yuan Fan wrote:
Hi, sorry if you found I have multi posted in different groups. It didn't
appear in that group.
I am trying to write an automated testing program with CxxTest, which in
turn needs to talk to gdb through the command line.
[snip]
Since you are already using the gcc tool chain, arguments to the effect
that pipes are platform specific are not necessarily valid as even on MS
products, as long as you install the cigwin environment, you have pipes.
That being said, your only issue is to deal with the pipes man pages. To
start work with pipes, try looking up the following man pages: pipe
(gives you 2 file descriptors), dup2 (which allows you to redirect input
& output), and fork.
Generally, you create your in/out pair with something like pipe prior to
forking, then in the child, redirect your IO to the appropriate fd. Ok,
so all that sounds great, but as one of the previous respondents said,
if you don't need to use this in an existing C++ program, expect isn't a
bad choice of an app to use which already has this all tied up.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla -
http://enigmail.mozdev.org
iD8DBQFA5Du3oo/Prlj9GScRAmGfAJ4pSdrwvtdoupLNpTpfqOzeMMlsIgCfQFJE
tI+9jUnYfKcx0yjN7mW4oyc=
=6z0v
-----END PGP SIGNATURE-----