Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Marketing The New Profit Frontier

Authors: Ed Burnett

1st Edition

0964535629, 978-0964535626

More Books

Students also viewed these Databases questions

Question

=+Trainers from headquarters? Local trainers? Independent trainers?

Answered: 1 week ago