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
Descriptor leak in Unix.close_process*
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-05-31 (19:33)
From: Sami Liedes <sliedes@c...>
Subject: Descriptor leak in Unix.close_process*
I think there's a descriptor leak in Unix.close_process_full and
possibly other close_process* functions. If there's an error in
closing one of the descriptors, I think the correct behavior would be
to close the rest nevertheless before throwing a Unix_error exception.

I think this can happen in some conditions (SIGPIPE?) even without
having explicitly closed some of the descriptors. Now I have a
situation where a mere Unix.close_process_full will result in a
descriptor leak but explicitly trying to close them one by one will