Exercise

Enhance your understanding and skills by attempting the exercise provided in this lesson!

We'll cover the following...

In this exercise, you are to gain some familiarity with the process management APIs about which you just read. Don’t worry – it’s even more fun than it sounds! You’ll, in general, be much better off if you find as much time as you can to write some code, so why not start now?

Questions

  1. Write a program that calls fork(). Before calling fork(), have the main process access a variable (e.g., x) and set its value to something (e.g., 100 ...