3 ms·
If you can count on pthreads, you can use pthread_atfork for that.
by JoshTriplett 12y ago
If you can count on pthreads, you can use pthread_atfork for that.
- taejo 12y agoThe problem with that is that a library can't count on pthreads: the application might call clone directly, without going through the libc wrapper, which calls the atfork callbacks.
- JoshTriplett 12y agoVery good point; pthread_atfork does not suffice. Thanks for the correction.