too many close calls for non-opened fds

Carson Gaspar carson at taltos.org
Thu Aug 17 07:25:05 EST 2006


--On Wednesday, August 16, 2006 10:56 PM +0200 Markus Friedl 
<markus.r.friedl at arcor.de> wrote:

> if a file is opened and the resource limit is decreased,
> then looping to the resource limit will miss some open files.

Does any UNIX variant have a "close all my open fds except for these" 
syscall? Or an easy way to get back a list of in-use fds? I really wish 
such a beast would be added, as calling close() on all possible fd numbers 
is _such_ a hack...

-- 
Carson



More information about the openssh-unix-dev mailing list