New submission from Vadim Tsozik :
Attached is code sample that forks child process either from main or from
background thread. Child starts and joins all of its threads except a sleeping
daemon. If parent forks child from main thread program exits immediately after
child threads are joined
Vadim Tsozik added the comment:
Thank you for your reply. I understand that forking and threads do not mix well
if developer is not careful and child doesn't clear/reset synchronization
variables inherited from parent. However this is not the case in provided code
sample. The answer