Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

additionally can you include pictures from your testing of the program. it would be helpful to compare the input and output. please test error handling

additionally can you include pictures from your testing of the program. it would be helpful to compare the input and output. please test error handling cases as well.
image text in transcribed
I could use some help with making this program. Please include the coding pieces listed below in order to get the program to work. Also use comments next to the code your write. the goal is to create a C program that repeatedly enters user input (interpreted as a shell command). The program should parse the command line to determine if it contains input/output redirection. Then the command line should be executed in a forked child process by using an "exec" call. The program should provide a shell prompt that contains the current working directory followed by a \&.If the current working directory changes, the prompt should be updated. Some pieces of code that should be used in the program are: - malloc and realloc - getenv - strdup - execvp for exec function - errno and strerror - \#define DEBUG

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

Database Principles Programming And Performance

Authors: Patrick O'Neil, Elizabeth O'Neil

2nd Edition

1558605800, 978-1558605800

More Books

Students also viewed these Databases questions

Question

9-5 How will MIS help my career?

Answered: 1 week ago