Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

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: 2002-08-07 (11:40)
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 <>

   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.

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: