This mini-project consisted of two parts:
- File Management
- Process Creation and Management
- The submitted code can be found in the
code
folder. - The code is written in C.
- Use GCC to compile the code.
- The specifications implemented are attached in the website folder . To view open the
.html
file in a browser.
A C program that does the following:
- Accepts user input.
- Displays file content.
fileManagement.c
: Contains the implementation for file management.
A C program that demonstrates various process API calls.
- Before creating your first child, have the parent process access a variable (e.g.,
x
) and set its value to 25. What is the value of the variable in the child process? What happens to the variable when both the child and parent change the value ofx
? - Create a child process that uses
exec()
to create a file namednewfile.txt
and store its parent process ID in the file. - Create a child process that outlives its parent process. The parent process should terminate immediately after forking. The child process should then print its parent process ID.
processManagement.c
: Contains the implementation for process management.