Question
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
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