mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-11-26 20:03:32 +08:00
- 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