The reference for this section is the Text Advanced Linux Programming that can be found at http://www.advancedlinuxprogramming.com/All of the text and the sample programs can be obtained from this site. 1. Read chapter 1 and 2 to ensure that you can compile, link and run programs and to help you understand the unix environment. 2. Study, compile and run the following programs. a. section 3.3 fork.c b. section 3.4 fork-exec.c c. section 4.1 thread-create.c d. section 4.2 thread-create2.c 3. Write a menu-driven c program that allows you to do the following under menu control. a.
The reference for this section is the Text Advanced Linux Programming that can be found at http://www.advancedlinuxprogramming.com/All of the text and the sample programs can be obtained from this site. 1. Read chapter 1 and 2 to ensure that you can compile, link and run programs and to help you understand the unix environment. 2. Study, compile and run the following programs. a. section 3.3 fork.c b. section 3.4 fork-exec.c c. section 4.1 thread-create.c d. section 4.2 thread-create2.c 3. Write a menu-driven c program that allows you to do the following under menu control. a. fork a process that will display your root directory. b. Input a file name and fork the emacs editor to create or modify the file. c. Input the name of a c program, and fork the gcc compiler to compile and link it. NOTE: Ensure that your code distinguishes the parent from the child process so that you donât create a fork bomb. The parent should wait for the child to finish before proceeding in the menu loop.





