From: John R. <jr...@bi...> - 2023-09-07 14:52:50
|
> ==17348== Warning: invalid file descriptor 1024 in syscall close() > > Your exe is probably trying to ensure all file descriptors are closed. You should probably use getrlimit() to query the upper limit rather than assume anything. Exes under Valgrind have a slighly lower limit because Valgrind uses some file descriptors itself (e.g., its log file). See also the manual page for 'close_range', which is a system call in Linux >= 5.9 and FreeBSD. You may have to think about what the parameters should be, but 'close_range' is very efficient. |