Since these bugs were filed against the DTS 10.0 version of GDB, I'm setting the rhdts-10.0.0? flag.
*** Bug 1884578 has been marked as a duplicate of this bug. ***
It may be worth considering changing gdb itself that when forking the child process to debug, it methodically clean up -all- incoming state, including env vars, open fds, and yeah signal handlers. It's conceivable that such litter may come in from other incidental bits of gdb environment (extension python solibs?), that a more formal hygiene pass now could prevent.
Verified against devtoolset-10-gdb-9.2-8.el7 thusly:
I took the srpm, did rpmbuild -bc and then, in the testsuite dir, I did:
make check RUNTESTFLAGS='GDB=\"/opt/rh/devtoolset-10/root/usr/bin/gdb\"' TESTS=gdb.base/signals-state-child.exp
devtoolset-10-gdb-9.2-8.el7 was built using devtoolset-10-elfutils-debuginfod-client-devel-0.180-3.el7.
Reproduced and verified also with attached /tools/gdb/Regression/bz1473411-gdb-leaks-ignored-SIGPIPE-to-child-process.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory (new packages: devtoolset-10-gdb), and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.