Question: - Create a subdirectory under your $HOME directory for this lab assignment. - Using vi editor, manually type in the entire code in Fig 1.10

 - Create a subdirectory under your \$HOME directory for this lab
assignment. - Using vi editor, manually type in the entire code in
Fig 1.10 of the textbook in shell 2.c. You may use 'vi'

- Create a subdirectory under your \$HOME directory for this lab assignment. - Using vi editor, manually type in the entire code in Fig 1.10 of the textbook in shell 2.c. You may use 'vi' editor as much as you can. (for this lab assignment only) set tabstop to 2-4 spaces to your preference set "set sm" (show match) along with other set ups like tabstop for your programming convenience in /.vimrc. use 'diff' tool to compare what you typed up with the original one (apue.3e/intro/shel12.c) that you untarred in HWI. - Copy the "apue. 3e/intro/Makefile' into your homework directory. This is the only file you may copy from the directory. Then modify the "Makefile" to compile the new "she112. c" successfully with other. h files and libraries under "apue. 3e " directory. - Now, modify your "she 112.c " file for the following requirements: Use execvp() intead of execlp() to execute child processes. The original "she112" program in Fig 1-10 of the APUE textbook page 19 (Section 1.9 Signals) supports command name only and it doesn't handle any options or arguments so '1s -1' command would give you "couldn't execute: ..." error message. But your "myShe 112 " would be a bit smarter - it would support most of options and arguments, not just command name alone. NOTE: If you allocated any dynamic memory in your program for any reasons, please make sure you free the heap memory allocated for your Expected Output Examples: Hints - To handle the command options, define an array of C-strings, cmd_strs. Note that C-string is an array of chars. What would be the data structure of an array of C-stings

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 Accounting Questions!