On Wed, 17.07.13 11:05, Shawn ([email protected]) wrote: > Wouldn't this be better using pthread_atfork() to avoid all the getpid() > calls?
No pthread_atfork() is not useful for much since it gives no ordering guarantees. Threading and forking doesn't mix well, and neither do single-use open file descriptors. I am just not interested in the bug reports. fork() on Unix is a very special thing. The only reason to ever call it is because you want to invoke exec() in the child quickly. Everything else is just broken, and slow (page faults due to Cow...) and browsing the journal certainly is certainly nothing you ever need for preparing before exec(). Lennart -- Lennart Poettering - Red Hat, Inc. _______________________________________________ systemd-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/systemd-devel
