In C how do you redirect stdin/stdout/stderr to files when making an execvp() or similar call?
Question:Ihavethefollowingcode:pid_tpid=fork();
if(pid==-1)
{
//...
}
elseif(pid==0)
{
stdin=someopenfile;
stdout=someotherfile;
stderr=somethirdopenfile;
execvp(args[0],args);
//handleerror...
}
else