Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

A: Write a C/C++ program that forks off (creates) a new child process that sends 3 messages to its parent via a pipe created by

A: Write a C/C++ program that forks off (creates) a new child process that sends 3 messages to its parent via a pipe created by the parent process (your main program). Use write and read functions as explained in the class examples. The 3 messages should be 3 lines with different pieces of information: Your full name Your Department And your email address Hints: You need to use the following system calls (see the slides posted on Piazza on the topic): pipe(), fork(), and wait()

B: Rewrite the program from A to be sending 3 messages from the parent to the child.

C: In this question do refactoring on program A so that write and read functions are not used. Tip/Hint: use dup/dup2, with other output and input statements (e.g., cout, cin)

D: (firs part of the shell): In this phase (part 1) you need to work on your terminal (shell simulator) and accomplish the points (1, 2, and 3) explained above.

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

Mastering Real Time Analytics In Big Data A Comprehensive Guide For Everyone

Authors: Lennox Mark

1st Edition

B0CPTC9LY9, 979-8869045706

More Books

Students also viewed these Databases questions