Homework 2 Due Date: January 28, 2002 100 Points 1. (15 points) Chapter 19, exercise 4 2. (15 points) Chapter 19, exercise 6 3. (70 points) Read the manual page for popen(3). However, your version will differ from the system version in the following ways: a. All environment variables should be deleted, except for PATH, IFS, TZ, and SHELL. These shold be set as follows: PATH to "/bin:/usr/bin:/usr/local/bin:/pkg/bin"; IFS to "\t\n "; TZ to "PST8PDT"; and SHELL to the user's login shell. b. All file descriptors except 0, 1, and 2 should be closed. c. The umask should be set to 077. Please turn in a tar file containing a source file popen.c with the source of popen and a README file. We will untar it, copy a Makefile, a test program, and a driver into the directory, and compile and test your routine. Your routine must be in the single file popen.c.