Solved-Lab 6 -Solution

$30.00 $19.00

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…

You’ll get a: . zip file solution

 

 
Categorys:
Tags:

Description

5/5 – (2 votes)

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

  1. Copy makeArgs.c into the folder tokenize

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

    1. fork() and store the result

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

    1. if the result of the fork() indicates the child – issue the appropriate execvp command

    1. 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

  1. 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)