c++ - reading standard output via read function instead of fread -
i program read standard output produced application. aware can use popen , use fread read output.
do know whether possible use read (and possibly open)? working in linux c/c++
you can file descriptor read() calling int fd = fileno(fp) file *fp have got popen(). aware must not mix calling read() , fread()!
edit
if want avoid popen(), have use pipe(), fork(), exec..() , dup2() it's done here
Comments
Post a Comment