Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Computer Networks

Authors: Andrew S. Tanenbaum, David J. Wetherall

5th edition

132126958, 978-0132126953

More Books

Students also viewed these Computer Network questions

Question

Identify the six ways to measure actual investment returns.

Answered: 1 week ago