Answered step by step
Verified Expert Solution
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.
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
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