Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

3. Although we did not spend time in lecture to study signals SIGCONT and SIGSTOP, it is not hard at all to see how these

3. Although we did not spend time in lecture to study signals SIGCONT and SIGSTOP, it is not hard at all to see how these two signals work. Read the brief description on these two signals in textbook on page 317 and 320.

Then follow the steps below to create your own program to observe how these two signals work. a) In the main function, fork a child process.

b) In the child process, using an infinite loop to print out something. For example, you can print out the value of an int variable and each iteration increase the value of this int variable. You may also optionally sleep for a second or two in the loop to slow down the loop.

c) In the parent process, sleep for a few second first, then send the SIGSTOP signal to the child process.

d) In the parent process, again sleep for a few second, then send the SIGONT signal to the child process.

e) Lastly, in the parent process, you can send the SIGINT signal to the child process to terminate it.

When running your program, observe what happens at step c) and d). Is the child process stopped and continued upon the receipt of the signals?

Submit your source code. Your source code should be commented at least for the above steps a) to e) so that we know how you implemented them. Script running your program with timing option and submit them as well.

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

Step: 3

blur-text-image

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

Labour Finance And Inequality

Authors: Suzanne J. Konzelmann, Simon Deakin, Marc Fovargue-Davies, Frank Wilkinson

1st Edition

1138919721, 978-1138919723

More Books

Students also viewed these Finance questions

Question

5. Describe the relationship between history and identity.

Answered: 1 week ago