Question
Can someone help me create this program for Linux.

Part 2. System Programming and Process Management You are asked to develop basic system programming including process creatio
0 0
Add a comment Improve this question Transcribed image text
Answer #1

As per HOMEWORKLIB RULES I am supposed to do first four subparts of a problem.You post the remaining questions seperately i will answer them.For various outputs we need to change the max value.

Hope you like my answer and hit that thumbs up.

#include<stdio.h>

#include<stdlib.h>
#include<sys/wait.h>
#include<unistd.h>
#define max 2
int main()
{
int loop=max;
int k=0;
while(k<loop)
{
if(fork() == 0)
{
printf("\n Hello\tchild process pid ppid: %d %d",getpid(),getppid());
exit(0);
}
  
k++;
}
for(k=0;k<max;k++)
wait(NULL);
  
return 0;
}

Add a comment
Know the answer?
Add Answer to:
Part 2. System Programming and Process Management You are asked to develop basic system programmi...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
Share Your Knowledge

Post an Article +5 Coins

Post an Answer +5 Coins

Post a Question with Answer +5 Coins

ADVERTISEMENT
ADVERTISEMENT