Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: <3B532313.3BB0051@etr-usa.com> Date: Mon, 16 Jul 2001 11:23:31 -0600 From: Warren Young Organization: -ENOENT X-Mailer: Mozilla 4.77 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: Corinna Vinschen Subject: Re: fork() References: <20010716152027 DOT U25442 AT cygbert DOT vinschen DOT de> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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/