Question: Write a shell like the code below. Your work should contain enough code that it works, and you can test it . Expand this code

Write a shell like the code below. Your work should contain enough code that it works, and you can test it. Expand this code to include redirection of input and output, pipes, and background jobs. #define TRUE 1 while (TRUE){/* repeat forever */ type_prompt(); /* display prompt on the screen */ read_command(command, parameters); /* read input from terminal */ if (fork()!=0){/* fork off child process *//*Parent code.*/ waitpid(1, &status, 0); /* wait for child to exit */} else {/* Child code. */ execve(command, parameters, 0); /* execute command */}}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!