]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
Clean up pass for the previous patches.
authorGuido van Rossum <guido@python.org>
Mon, 22 Mar 1999 21:44:51 +0000 (21:44 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 22 Mar 1999 21:44:51 +0000 (21:44 +0000)
commit3baaa1375ba03cf2d7fa3af884d6a99294c2587a
treeaac08e6b33951533ae86c53fb6705c23e4cd0795
parent955becc3d963ebd66a1edea22d47dd24f34035e7
Clean up pass for the previous patches.

- Use HAVE_GETHOSTBYNAME_R_6_ARG instead of testing for Linux and
glibc2.

- If gethostbyname takes 3 args, undefine HAVE_GETHOSTBYNAME_R --
don't know what code should be used.

- New symbol USE_GETHOSTBYNAME_LOCK defined iff the lock should be used.

- Modify the gethostbyaddr() code to also hold on to the lock until
after it is safe to release, overlapping with the Python lock.

(Note: I think that it could in theory be possible that Python code
executed while gethostbyname_lock is held could attempt to reacquire
the lock -- e.g. in a signal handler or destructor.  I will simply say
"don't do that then.")
Modules/socketmodule.c