Multiple Fork() Calls
by Victor43 from LinuxQuestions.org on (#5M6GR)
Hello, I found the following piece of code here I would like to learn what happens when this piece of code is executed ? I'm not certain but believe that a single parent is created having three child threads. Does this sound correct ?
Quote:
Quote:
int main() { int status; if(!fork()) execl("pp1",NULL); if(!fork()) execl("pp2",NULL); if(!fork()) execl("pp3",NULL); wait(&status); return status; } |