Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
Message-ID: <3B532313.3BB0051@etr-usa.com>
Date: Mon, 16 Jul 2001 11:23:31 -0600
From: Warren Young <warren@etr-usa.com>
Organization: -ENOENT
X-Mailer: Mozilla 4.77 [en] (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
To: Corinna Vinschen <cygwin@cygwin.com>
Subject: Re: fork()
References: <NEBBJCJLGLCEEOPGCDCEIEJICIAA.ronald@landheer.com> <20010716152027.U25442@cygbert.vinschen.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/

