Ok im trying to make this simple program in UNIX using forks. What it does is it creates two child processes, and they both should print out a string, and then when the program finishes it prints out the getpid() function. Only three lines should appear, however, my code just jumps to the second child first, then prints that, then prints the first child stuff and prints the second child stuff again. Here's my code, I have no idea what is going on.
http://sourcepost.sytes.net/sourcevi...ource_id=16947



LinkBack URL
About LinkBacks


