Fair enough. I almost suggested FD_CLOEXEC myself, but figured the guy wanted to stay within his module, since
kingkongrevenge says:
When a user of the module forks, I want to close the duped socket connection and open a new one. It is the opening of a new one that would be rather difficult after an exec - although not impossible if the exec was to perl with a -M option, and the module opened the new handle in its BEGIN block.