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
[Caml-list] closing file descriptors and channels
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2003-11-20 (17:14)
From: Nicolas George <>
Subject: Re: [Caml-list] closing file descriptors and channels
Le decadi 30 brumaire, an CCXII, Xavier Leroy a écrit :
> The other possibility is to use close_out_noerr and close_in_noerr
> that will just ignore the errors arising from the closing of the
> underlying file descriptor.  But this can be dangerous:

This can be even more dangerous if another file has been opened between
the two closes (which can be invisible in threaded programs) and has got
the file descriptor that has just been closed.

I am preparing a RFC for this list about a complete rewrite of the I/O
subsystem, and this is definitively a problem that must be addressed.