This implies that the common usage of getdtablesize() to find out the
highest numbered fd is wrong to begin with, since a process could open
(or inherit!) a fd and subsequently lower RLIMIT_NOFILE. It also
suggests it is not possible to find out the highest numbered fd at
all. (And using the _soft_ limit makes it sounds yet more questionable
IMHO.)
Net result: apart from using /proc (which is Linux-specific) there is
no reliable way to close all open fds and the traditional way using
the loop like in ciped is bogus. Right?
Olaf
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/