plz solve this fork program problem
hi i have a question and i need its answer urgently so can u please answer me as fast as possible.
Here is a program that created 8 processes including the initial parent process. Modify the program that would create 7 processes including the initial parent process. #include <stdio.h> #include <sys/types.h> #include <unistd.h> main (void) { int i; printf("\n\nInitial Process \t PID %6d \t PPID %6d \t GID %6d\n\n", getpid(), getppid(), getpgid(0)); for(i=0; i<3; ++i) if (fork() == 0) printf("\n\nNew Process \t PID %6d \t PPID %6d \t GID %6d\n\n", getpid(), getppid(), getpgid(0)); } |
Per the LQ Rules, please do not post homework assignments verbatim. We're happy to assist if you have specific questions or have hit a stumbling point, however. Let us know what you've already tried and what references you have used (including class notes, books, and Google searches) and we'll do our best to help. Also, keep in mind that your instructor might also be an LQ member.
|
Sorry for this . . .But i am new in Unix so i asked for help. I would appreciate if someone help me . And also this is my first post as u can see. I want to improve my unix knowledge so in future i can help other people who post their problem on this website
|
I'm afraid you missed the point in the response above. Specifically:
Quote:
|
Quote:
jlinkels |
All times are GMT -5. The time now is 03:47 AM. |