- Move C constructor definitions and mutable test hook state from the //export cgo preamble in main.go into a dedicated hooks.c translation unit so cgo does not emit duplicate constructors.
- Append grandchild PIDs safely with pre-fork lock setup and verify exact child count and descriptor lock release during test cleanup.
- Add a cgo preprocessing regression test verifying that _cgo_export.h, _cgo_export.c, and main.cgo2.c contain no constructor definitions.
Closes: #7647