I am trying to call a shell function using fork() and exec() and I don't know how to get the output. Precisely, this is what my code does:
if (!fork()){
execv(factor, arg);
}
How could I get the output of "factor" ?
I am trying to call a shell function using fork() and exec() and I don't know how to get the output. Precisely, this is what my code does:
if (!fork()){
execv(factor, arg);
}
How could I get the output of "factor" ?