On openSUSE Leap 15.6 with XFS I've noticed that all processes get the 3 usual standard fds 0 1 and 2 plus one extra for inotify. For instance for this trivial exe
#include <unistd.h>
int main()
{
usleep(100000000L);
}
lsof shows (ignoring libs, cwd and the exe itself)
test 7212 paulf 0u CHR 136,2 0t0 5 /dev/pts/2
test 7212 paulf 1u CHR 136,2 0t0 5 /dev/pts/2
test 7212 paulf 2u CHR 136,2 0t0 5 /dev/pts/2
test 7212 paulf 44r a_inode 0,14 0 2074 inotify
This interferes with the Valgrind --track-fd regression tests.
Is there any way to turn this off?