Running interactive Programs within C++ ?

Hi,
I have to write an frontend for several interactive Commandlineprograms and Shellsripts.

I search for away to realize it like that:

1. Run Program/Script
2. wait/sleep until Console/Terminal-Output arrived.
3. Parse/Analyse it.
4. Send a response back to the Console/Terminal.
5. Continue with 2-4 until Script/Program terminates.

Is there anything like system() or exec() that gives me a pipe/stream back that I can analyse? I found nothing until now, so any kind of suggestions, like libraries, are welcome.




If you are going to run on UNIX or Linux, you can use popen(3C). Just do a man on popen on your system for more information.
Topic archived. No new replies allowed.