Threads and fork(): think twice before mixing them
linuxprogrammingblog.com