Answered step by step
Verified Expert Solution
Link Copied!

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 fork/exec/wait. Your program will repeatedly:
1.Prompt the user for a command (assume there are no arguments), if the command is exit, quit
2.spawn a child
3.wait
Each child will
1.try to call some form of exec to run the command
2.if exec fails, the child prints "command failed" and ends

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

Mastering Influxdb Database A Comprehensive Guide To Learn Influxdb Database

Authors: Cybellium Ltd ,Kris Hermans

1st Edition

B0CNGGWL7B, 979-8867766450

More Books

Students also viewed these Databases questions

Question

What are the purposes of promotion ?

Answered: 1 week ago

Question

Define promotion.

Answered: 1 week ago

Question

Write a note on transfer policy.

Answered: 1 week ago