Threads and fork(). How can I deal with that? [duplicate]
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: fork in multi-threaded program If I have an application which employs fork() and might be developed as multithreaded, what are the thumb rules/guidelines to consider to safely program this kind of applications? 回答1: The basic thumb rules, according to various internet articles like ( http://www.linuxprogrammingblog.com/threads-and-fork-think-twice-before-using-them , fork in multi-threaded program ) are: (Main)