Re: fork() Problem?

David Miller (davem@twiddle.net)
Tue, 4 May 1999 23:52:38 -0700


Date: Wed, 5 May 1999 09:19:54 +0300 (EEST)
From: Yavuz Selim Komur <komur@albatros.bcc.bilkent.edu.tr>

Problem is sequence error.

if (pid = fork())
printf("Main Program");
else
printf("Child Program");

it's clear?

So Linux runs the child before the parent in your test runs, whereas
the opposite is true on other systems. Is this a problem?

Later,
David S. Miller
davem@redhat.com

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/