On Nov 12, 2007 11:00 PM, Arthur de Jong <[EMAIL PROTECTED]> wrote:
> Anyone have a better way to detect the highest open file descriptor
> (preferably something that also works inside a chroot jail that does not
> have /proc mounted)? NetBSD seems to have fcntl(F_MAXFD) that should do
> the trick, but it's unavailable on Linux.

If we do find a method that works, it seems sensibile to make a simple
LD_PRELOAD library you can set that will spit out warnings whenever
extra file descriptiors are left open. The FD_CLOEXEC flag exists for
a reason and most cases to probably bugs.

Have a nice day,
-- 
Martijn van Oosterhout <[EMAIL PROTECTED]> http://svana.org/kleptog/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to