]> git.ipfire.org Git - thirdparty/valgrind.git/commit
Close both internal pipe fds after VG_(fork) in parent and child
authorMark Wielaard <mark@klomp.org>
Sun, 16 Jun 2024 22:27:12 +0000 (00:27 +0200)
committerMark Wielaard <mark@klomp.org>
Mon, 17 Jun 2024 15:59:22 +0000 (17:59 +0200)
commit1263471efdf8405cb0f1a767c6af73bf2eaf7160
tree4e0ee5d5ee79aca65294906daa8cc0bc9366e110
parentfbd7596f8342f0b0fbbe088d960da839a8bdb839
Close both internal pipe fds after VG_(fork) in parent and child

An VG_fork() creates a pipe between parent and child to syncronize the
two processes. The parent wants to register the child pid before the
child can run. This is done in register_sigchld_ignore.

Make sure both the parent and the child close both the read and write
file descriptors so none leak.

https://bugs.kde.org/show_bug.cgi?id=479661
coregrind/m_libcproc.c
none/tests/Makefile.am
none/tests/track-fds-exec-children.c [new file with mode: 0644]
none/tests/track-fds-exec-children.stderr.exp [new file with mode: 0644]
none/tests/track-fds-exec-children.vgtest [new file with mode: 0644]