]> git.ipfire.org Git - thirdparty/valgrind.git/commit
Don't count closed inherited file descriptors
authorMark Wielaard <mark@klomp.org>
Tue, 13 May 2025 22:13:06 +0000 (00:13 +0200)
committerMark Wielaard <mark@klomp.org>
Wed, 14 May 2025 18:31:45 +0000 (20:31 +0200)
commit46c50747724c70c4200257361b55ebb615a2fb35
treeb85a2d6bea640c6198b16737a413cd61b51bc1b1
parent9b967eacdfcfaf7a6dfa472dc462bc54653a2fb7
Don't count closed inherited file descriptors

Programs which close some inherited file descriptors and are run under
valgrind with -q and --track-fds=yes would still show the FILE
DESCRIPTORS banner even if there were no non-inherited file
descriptors still open.

Fix this by not counting already closed inherited file descriptors.

Add a simple testcase to show /usr/bin/cat /dev/null doesn't produce
any output running under valgrind -q --track-fds=yes.

https://bugs.kde.org/show_bug.cgi?id=504177
(cherry picked from commit 29a5fcb3f6371584f89f9b54c793cc0f29802553)
NEWS
coregrind/m_syswrap/syswrap-generic.c
none/tests/Makefile.am
none/tests/fdleak_cat.stderr.exp [new file with mode: 0644]
none/tests/fdleak_cat.vgtest [new file with mode: 0644]