//runScript.c
pid= fork();
if(pid ==0) {
error = execv("/usr/local/bin/php", "something.php" , (char *)NULL);
exit(0);
} else {
wait(pid);
exit(0);
}
the php file has #!/usr/local/bin/php at the top
However, the file is not run, I am thinking I need to reset the file descriptors.
-something.php runs in an infinite loop and should write to the stdout.
pid= fork();
if(pid ==0) {
error = execv("/usr/local/bin/php", "something.php" , (char *)NULL);
exit(0);
} else {
wait(pid);
exit(0);
}
the php file has #!/usr/local/bin/php at the top
However, the file is not run, I am thinking I need to reset the file descriptors.
-something.php runs in an infinite loop and should write to the stdout.