[Python-checkins] CVS: python/dist/src/Modules socketmodule.c

Guido van Rossum guido@cnri.reston.va.us
Mon, 22 Mar 1999 16:44:54 -0500 (EST)

Update of /projects/cvsroot/python/dist/src/Modules
In directory eric:/projects/python/develop/guido/src/Modules

Modified Files:
Log Message:
Clean up pass for the previous patches.

- Use HAVE_GETHOSTBYNAME_R_6_ARG instead of testing for Linux and

- 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.")