Answered step by step
Verified Expert Solution
Question
1 Approved Answer
!!!please answer this question including the BONUS part of the question thank you in advance!! 10. Write a C function named readForkExec), whose prototype is
!!!please answer this question including the BONUS part of the question thank you in advance!!
10. Write a C function named readForkExec), whose prototype is given below, that will accept a file descriptor belonging to the read end of a pipe. Each message will contain the name of an executable and a single argument. The function should read all messages from the pipe, and for each one run the specified executable using the supplied argument (preserving the parent process) Bonus points: ensure that we do not create any zombies, and also avoid waiting for a potentially unbounded length of time. int readForkExec(int fd) The structures you will read from the pipe is defined as follows: struct command char exename [ 64] char arg [641; li
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