Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a simple shell program using fork / exec / wait . Your program will repeatedly: 1 . Prompt the user for a command (
Write a simple shell program using forkexecwait Your program will repeatedly:
Prompt the user for a command assume there are no arguments if the command is exit, quit
spawn a child
wait
Each child will
try to call some form of exec to run the command
if exec fails, the child prints "command failed" and ends
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started