Question: 7/ a/ what does int pid = fork() do? b/ after fork(); HOW TO TELL whether it's the parent or the child executing? c/ What

7/

a/ what does int pid = fork() do?

b/ after fork(); HOW TO TELL whether it's the parent or the child executing?

c/ What does int wait(int *status) do?

d/ What does int r = execve("a.out", argv, env); do?

e/ How does the system find a.out?__________________________________

f/ Assume the Linux cat is in /bin directory. When running YOUR sh with cat file1 file2 file3 > outfile How did YOU do the > outfile part?

g/ Draw a diagram to show exactly what's YOUR myargv in the r = execve("/bin/cat", myargv, env) call?_________________________

h/ What's the value of r? ____________ HOW would you do PIPE in cat file | grep pattern ?__________________________

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!