[PATCH v1 1/2] open: add close_range()
David Laight
David.Laight at ACULAB.COM
Fri May 24 02:29:44 AEST 2019
From: Konstantin Khlebnikov
> Sent: 23 May 2019 17:22
....
> > In addition, the syscall will also work for tasks that do not have procfs
> > mounted and on kernels that do not have procfs support compiled in. In such
> > situations the only way to make sure that all file descriptors are closed
> > is to call close() on each file descriptor up to UINT_MAX or RLIMIT_NOFILE,
> > OPEN_MAX trickery (cf. comment [8] on Rust).
Code using RLIMIT_NOFILE is broken.
It is easy to reduce the hard limit below that of an open fd.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
More information about the Linuxppc-dev
mailing list