4 ms·
Why don't people use https://daurnimator.com/post/120415954844/linux-fork-detection-using-thread-specific https://daurnimator.com/post/120415954844/linux-fork-d
by daurnimator 9y ago
Why don't people use https://daurnimator.com/post/120415954844/linux-fork-detection-using-thread-specific https://daurnimator.com/post/120415954844/linux-fork-detecti...
Related discussion: https://news.ycombinator.com/item?id=9636861 https://news.ycombinator.com/item?id=9636861
- colmmacc 9y agoWow, that's a cool trick - personally, I didn't know this is possible. Does it mean a system call and context switch for every check though? One thing I like about the MINHERIT_ZERO/MADV_WIPEONFORK approach is that it's basically just a low-cost cache-friendly memory lookup at run-time, the only expense is at fork time.