pthread_self() is stable across fork, well, for the main thread Feb 8, 2015 gist.github.com/kostja/767622d554c676a35454