in reply to Detecting fork events in a module?

I half remember something I scanned over when when writing Win32::Fmode that your question stirred in my memory. Since noone else has mentioned it, I will--though I can do no more than just mention it.

Check out your man page for Fcntl() and FD_CLOEXEC. It might lend itself to your needs.

File descriptors open in the calling process image remain open in the new process image, except for those whose close-on-exec flag FD_CLOEXEC is set; (see fcntl(2)).

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."