Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

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

image text in transcribed
image text in transcribed
- 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 - 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

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_2

Step: 3

blur-text-image_3

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

Advances In Databases And Information Systems 22nd European Conference Adbis 2018 Budapest Hungary September 2 5 2018 Proceedings Lncs 11019

Authors: Andras Benczur ,Bernhard Thalheim ,Tomas Horvath

1st Edition

3319983970, 978-3319983974

Students explore these related Databases questions