Yury Selivanov added the comment:

Maybe instead of releasing the lock in the forked child process, we should try 
to acquire the lock in the os.fork() implementation, and then release it?

Otherwise, suppose that a call to getaddrinfo (call #1) takes a long amount of 
time.  In the middle of it we fork, and then immediately try to call 
getaddrinfo (call #2, and call #1 is still happening) for some other address. 
At this point, since getaddrinfo isn't threadsafe, something bad will happen.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25920>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to