Question: C program that takes one command line argument: the fully qualified name of a folder. The program creates two children processes. The first child process
C program that takes one command line argument: the fully qualified name of a folder. The program creates two children processes. The first child process checks whether the input folder name already exists on the filesystem and communicates the outcome to the second child process via a pipe and exits. The second child process will then either create the folder if it does not exist or perform no action if the folder already exists. Upon creation of the folder, the second child process sends a confirmation message to the parent process via another pipe and then exits. The parent process then checks for the folder to be empty. If there is content in this folder, the parent process deletes all content and prints a message for the user upon successful completion and terminates. All printing, input, and reading (from filesystem or the console) should be done by system calls. You cannot use any library functions.
Step by Step Solution
There are 3 Steps involved in it
To solve this problem we will develop a C program following these steps Step 1 Parse Command Line Arguments Start by verifying that a command line argument for the folder name is provided Step 2 Creat... View full answer
Get step-by-step solutions from verified subject matter experts
