Version française
Home     About     Download     Resources     Contact us    
Browse thread
Re: [Caml-list] Matching when
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Bruno.Verlyck@i...
Subject: Re: [Caml-list] Sharing Files between OCaml and C
   Date: Tue, 6 Aug 2002 14:50:44 -0400 (EDT)
   From: Lex Stein <stein@eecs.harvard.edu>

   On POSIX compliant systems, dup() does not, in fact, create a new
   vnode for a file.  It merely creates a new file descriptor table
   entry (in the process's in-kernel descriptor table) that points to
   exactly the same vnode.  The two descriptors share the same
   buffered blocks in the global buffer cache.
The problem I was alluding to is a local (inside the Caml process)
buffering one: the Caml runtime doesn't use C stdio, and has its own
buffering scheme.  As the original poster told us about FILE * and
channels, I assumed he would mix I/O on channels and FILE * pointing
to the same file.  Then he has to be cautious.

Bruno.
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners