Version française
Home     About     Download     Resources     Contact us    
Browse thread
Closing all open file descriptors
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Andre Nathan <andre@d...>
Subject: Re: [Caml-list] Closing all open file descriptors
On Thu, 2007-09-13 at 23:41 -0700, Dave Benjamin wrote:
> Yes, I assumed that this would be non-portable, and that is yet another 
> problem. It seems that dropping down to C is the only way to really do 
> this right.

You could check for the availability of the closefrom() system call,
which closes descriptors starting from the one passed as its argument. I
believe the BSDs and Solaris have it.

HTH,
Andre