Question: Refer to Figure 3 - Using fork ( ) . Figure 3 - Using fork ) Question continues on next page. ( a ) Describe

Refer to Figure 3- Using fork().
Figure 3- Using fork)
Question continues on next page.
(a) Describe the purpose of the fork() function.
(b) The following statement is often associated with the fork() function: "It is
called once but it returns twice".
Explain what this means with reference to child and parent processes and
identify which lines of code relate to the child process.
(8 marks)
(c) Socket descriptors are shared between child and parent processes. Explain
what this means. In your answer explain why closing the listening socket on
line 8 does not impact on the ability to accept new connections as per the call to
accept () on line 3.
(12 marks)
 Refer to Figure 3- Using fork(). Figure 3- Using fork) Question

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!