Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a C program with a focus on system calls. So only use read() and write() for obtaining input and creating output - do not

Write a C program with a focus on system calls. So only use read() and write() for obtaining input and creating output - do not use printf or fopen. Use open() and close() and other system call functions where necessary.

The programs should take input from STDIN continually until termination with a Control-D.

Write a program called parent that creates 2 child processes that will each execute another program. That other program will simply capture STDIN and send it to STDOUT or to a text file.

- The parent program, parent, should read characters from STDIN and send them to the children using pipes. - The first child process should send the characters to a text file (this child would simply think it's getting a STDIN). - The second child process should just send the characters to STDOUT for display.

hint: parent will loop for user input of STDIN.

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

Essential SQLAlchemy Mapping Python To Databases

Authors: Myers, Jason Myers

2nd Edition

1491916567, 9781491916568

More Books

Students also viewed these Databases questions

Question

What do Dimensions represent in OLAP Cubes?

Answered: 1 week ago