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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started