Comment by agwa
4 years ago
pthread_atfork functions aren't called if the application calls the clone syscall directly. The right solution is MADV_WIPEONFORK on Linux, or MINHERIT_ZERO on OpenBSD:
https://www.metzdowd.com/pipermail/cryptography/2017-Novembe...
That helps with memory mappings, but it doesn't help with file descriptors -- you still have to be careful with those.