# Assignment

## getpid
Getpid is a call to the operating system's process management system. It simply returns the value of the current process's process ID (PID).

In this program, it is saved to the variable parentID. 

##  gets
Gets is a call to the operating system's input/output system. It's arguments are a character array. It reads in bytes as characters, filling up the array, until it reads in a newline or end of file character.

In this program, gets reads in a maxixum of 1024 bytes.

## fork
Fork is a call to the operating system's process management system. Fork creates an identical child process. The value of cid will be the only difference between two processes. For the child process, the return value of fork will be 0. For the parent process, the return value of fork will be the process ID of the child process.

In this program, the return values of fork are saved into the valiable cid

## execlp
Execlp is a call to the operating system's memory management system. Execlp clears the current process's memory and runs a program. It's main argument is the programs to run

In this case, the child process runs the program name provided by prgname

## sleep
Sleep is a call to the operating system's process management system. Sleep causes a program to pause execution for some number of seconds. 

In this program, the parent process waits for 1 second

## waitpid
Waitpid is a call to the operating system's process management system. Waitpid causes the current process to wait until another process finishes executing.

In this case, waitpid waits until the child process finishes executing. 

## printf 
Printf is a call to the operating system's input/output system. It takes in a string and formats it using its other arguments, then prints it to the standard output. 

# Explanation
This program takes in the name of another program. It then runs this program if it is found, or otherwise prints that the program is not found. After this finishes (in either case), the programs prints that it program has finished executing and exits. 

