==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.
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users