Starting from:
$30

$24

Lab 6 Solution

You answers will be in the form of a PDF/C Code.




In class we discussed the basics of fork and exec. Using your makeArgs.c and makeArgs.h

Copy makeArgs.c into the folder tokenize



I have provided a C file named cscd340Lab6.c. You must write the forkIt function in process.c This function will:



fork() and store the result



check the result of fork() if in the parent - issue a waitpid command waiting for the pid



if the result of the fork() indicates the child - issue the appropriate execvp command



Check the results of the exec command – if the execvp command was invalid issue an exit to kill the child



Run your code with multiple commands both valid and invalid and capture the valgrind output. Store the valgrind output in a PDF.




NOTE: The grader will be running simple commands (both valid and invalid) such as ls -l, pwd, pwe, ls - al, make, etc.







TO TURN IN




zip



Your PDF of your valgrind run Your C files




You will submit a zip file named your last name first letter of your first name lab6.zip (Example steinerslab6.zip)

More products