On 6/16/23 17:27, Bin Meng wrote:
+int qemu_close_range(unsigned int first, unsigned int last)
+{
+DIR *dir = NULL;
+
+#ifdef CONFIG_CLOSE_RANGE
+int r = close_range(first, last, 0);
+if (!r) {
+/* Success, no need to try other ways. */
+return 0;
+}
+#endif
What
On 6/16/23 17:27, Bin Meng wrote:
This introduces a new QEMU API qemu_close_range() that closes all
open file descriptors from first to last (included).
This API will try a more efficient call to close_range(), or walk
through of /proc/self/fd whenever these are possible, otherwise it
falls back
This introduces a new QEMU API qemu_close_range() that closes all
open file descriptors from first to last (included).
This API will try a more efficient call to close_range(), or walk
through of /proc/self/fd whenever these are possible, otherwise it
falls back to a plain close loop.
Co-develope