caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* printf and fork question
@ 2005-03-07 13:44 Michael
  2005-03-07 13:57 ` [Caml-list] " Gerd Stolpmann
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Michael @ 2005-03-07 13:44 UTC (permalink / raw)
  To: caml-list

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


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-03-07 14:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-07 13:44 printf and fork question Michael
2005-03-07 13:57 ` [Caml-list] " Gerd Stolpmann
2005-03-07 14:03 ` Basile STARYNKEVITCH
2005-03-07 14:05 ` David Fox
2005-03-07 14:10 ` Olivier Andrieu
     [not found] ` <6b8a9142050307060758200ad3@mail.gmail.com>
2005-03-07 14:12   ` Michael

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).