Hi
I need to used popen to call a process and execute multiple commands.
e.g FILE *fd = popen("/bin/sh", "w");
while(condition) {
fwrite(each_time_command_changes,..,..,fd);
}
pclose(fd);
I have hard time to get output in between each command execution. The program sends the output only after executiong pclose()(prints all output together).
It would be gr8 if any one can help me with this issue.
thanks
pad.
I need to used popen to call a process and execute multiple commands.
e.g FILE *fd = popen("/bin/sh", "w");
while(condition) {
fwrite(each_time_command_changes,..,..,fd);
}
pclose(fd);
I have hard time to get output in between each command execution. The program sends the output only after executiong pclose()(prints all output together).
It would be gr8 if any one can help me with this issue.
thanks
pad.