From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 56B77BC48 for ; Mon, 7 Mar 2005 14:44:06 +0100 (CET) Received: from mail.gmx.net (pop.gmx.de [213.165.64.20]) by nez-perce.inria.fr (8.13.0/8.13.0) with SMTP id j27Di57F003731 for ; Mon, 7 Mar 2005 14:44:06 +0100 Received: (qmail invoked by alias); 07 Mar 2005 13:44:05 -0000 Received: from J25ef.j.pppool.de (EHLO localhost) (85.74.37.239) by mail.gmx.net (mp020) with SMTP; 07 Mar 2005 14:44:05 +0100 X-Authenticated: #20477425 Date: Mon, 7 Mar 2005 14:44:22 +0100 From: Michael To: caml-list@yquem.inria.fr Subject: printf and fork question Message-Id: <20050307144422.1e67bef6.micha-1@fantasymail.de> X-Mailer: Sylpheed version 0.9.12-gtk2-20040617 (GTK+ 2.4.9; i586-mandrake-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Y-GMX-Trusted: 0 X-Miltered: at nez-perce with ID 422C5AA6.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; printf:01 printf:01 getpid:01 waitpid:01 ocaml:01 unix:01 match:02 hints:03 let:03 fork:04 fork:04 exit:04 michael:07 michael:07 question:11 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.1 required=5.0 tests=FORGED_RCVD_HELO autolearn=disabled version=3.0.2 X-Spam-Level: Hi, I don't understand why this: open Unix;; let _ = Printf.printf "Hi! %d\n" (getpid()); match fork() with | 0 -> if fork() <> 0 then exit 0; () | id -> ignore (waitpid [] id) prints out that: Hi! 12215 Hi! 12215 Hi! 12215 with ocaml 3.08.2. Any hints? Michael