Question: 2) Simulate Inter-process Communication Write a C/C++ program to simulate the inter-process communication between a child process and a parent process. You need to modify
2) Simulate Inter-process Communication
Write a C/C++ program to simulate the inter-process communication between a child process and a parent process. You need to modify the program you wrote in the procedure 1). In your program:
First, use pipe() to generate a buffer. The pipe should return a status (int), which should be tested to see if it is successful. If not, print error message.
Create a child process.
If the process creation is successful, send a short message (a character string) from child process by using write() to the pipe. In the parent process, use read() to receive the string from the child.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
