Subject: Re: fork()
From: Warren Young <[email-masked]>
To: Corinna Vinschen <[email-masked]>
Date: Mon, 16 Jul 2001 11:23:31 -0600

Corinna Vinschen wrote:
> 
> Your example is wrong. The output to stdout is line buffered. That means,

Another problem is, the code depends on the OS's multitasking
characteristics.  There's nothing explicit in the code that says the OS
has to take the time slice away from the parent or the child.  If you
threw in a line like this:

	if (rand() % 2) sleep(0);

after each print statement, you might reasonably expect randomness in
the output.
-- 
= Warren -- ICBM Address: 36.8274040 N, 108.0204086 W, alt. 1714m

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/