English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

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: 2007-09-14 (10:55)
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.