mardi 5 mai 2015

Redirect stdin/stdout of any program in Linux C?

How would one go about making a program (program A) that takes an argument of the location of ANOTHER program (Program B) in the background...

Basically program A would start in the background, then it would start program B, then would redirect program B's stdout to a file (flush-style/live feed)

After program B has been started, it's stdin can be accessed from typing in something like "A -in 'quit'" into the terminal.

Aucun commentaire:

Enregistrer un commentaire