CLOSE_RANGE_CLOEXEC
#ifndef CLOSE_RANGE_CLOEXEC
syscall(__NR_close_range, 0, ~0U, CLOSE_RANGE_CLOEXEC);
if (flags & ~(CLOSE_RANGE_UNSHARE | CLOSE_RANGE_CLOEXEC))
if (flags & CLOSE_RANGE_CLOEXEC)
if (flags & CLOSE_RANGE_CLOEXEC)
ret = sys_close_range(1000, 1000, CLOSE_RANGE_CLOEXEC);
ret = sys_close_range(open_fds[0], open_fds[50], CLOSE_RANGE_CLOEXEC);
ret = sys_close_range(open_fds[75], open_fds[100], CLOSE_RANGE_CLOEXEC);
ret = sys_close_range(3, UINT_MAX, CLOSE_RANGE_CLOEXEC);
ret = sys_close_range(1000, 1000, CLOSE_RANGE_CLOEXEC);
CLOSE_RANGE_CLOEXEC | CLOSE_RANGE_UNSHARE);
CLOSE_RANGE_CLOEXEC | CLOSE_RANGE_UNSHARE);
CLOSE_RANGE_CLOEXEC | CLOSE_RANGE_UNSHARE);
ret = sys_close_range(3, ~0U, CLOSE_RANGE_CLOEXEC);
CLOSE_RANGE_CLOEXEC);