Question: Multi-Part question. Please respond with C code (or C++ just specify) a- Write a UNIX program that creates a child process b- Open a file,

Multi-Part question. Please respond with C code (or C++ just specify)

a- Write a UNIX program that creates a child process

b- Open a file,

Use fprintf() to write 1, 2, 3, 100 to the file, with each number occupying one line; (Take Screenshot)

Close the file.

c- In a Linux terminal, please run command ps ef. You will see a list of processes in the system.

1. Pick up the bash process (the Shell process) which you are its owner (suppose the process is PROC), obtain its PID (Process ID).

2. go to /proc, then go to the corresponding directory for this process PROC, answer the following question:

What are the cmdline, environ, io, and sched of the process PROC?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!