#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
int main (int args, char *argv[])
{
pid_t fork_return;
pid_t pid;
pid=getpid();
fork_return = fork();
// When fork() returns -1, an error happened.
if (fork_return==0)
// When fork() returns 0, we are in the child process.
{
printf(“nnThe values are Child ID = %d, Parent ID=%dn”,getpid(), getppid());
execl(“/bin/cat”, “cat”, “-b”, “-v”, “-t”, argv[1], 0);
}
else
// When fork() returns a positive number, we are in the parentprocess
// and the return value is the PID of the newly created childprocess.
{
wait(NULL);
printf(“nChild Completes ” );
printf(“nIn the Parent Processn”);
printf(“Child Id = %d, Parent ID = %dn”, getpid(),getppid());
}
return 0;
}
Q1 Once this program is typed, and executed, answer thefollowing questions
a. If you try to print a
PayPal Gateway not configured
PayPal Gateway not configured