httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brad Nicholes" <>
Subject Re: closesocket() vs close()
Date Thu, 16 Oct 2003 22:30:23 GMT
      Looking at the code as it is currently implemented for NetWare,
this is a bug.  NetWare should be calling closesocket() here rather than
close().  Since the calls to close() would only happen on an error
condition and Apache would immediately exit() anyway, this hasn't really
caused us a problem in the past even though it is incorrect.  Calling
close() on a socket handle in NetWare would simply return an error.  In
this case the orphaned socket handle would be clean up by the OS after
Apache exited.  So the cleanup that Jim is proposing would actually fix
a potential problem for NetWare.  My guess is that it would fix the same
problem for Win32 since they are based on Winsock as well.


Brad Nicholes
Senior Software Engineer
Novell, Inc., the leading provider of Net business solutions 

>>> Thursday, October 16, 2003 9:29:03 AM >>>
Forwarded message:
>       * Bugz: #22805
>   -      Jim is working on a somewhat revised patch which also 
>   -      uses closesocket() universally (instead of the places
>   -      where we do #ifdef BEOS...). Only the changes to buff.c
>   -      are being considered at this time.
>   +       Jim is considering just the buff.c patches in addition
>   +       to cleanup of http_main.c where we wrap close/closesocket
>   +       around '#ifdef BEOS' which does not seem correct. Under
>   +       Unix, we define closesocket as close, and isn't
>   +       what we should be using for Win32 and Netware as well?

Comments from the Win32 and Netware people??
   Jim Jagielski   [|]   [|] 
      "A society that will trade a little liberty for a little order
             will lose both and deserve neither" - T.Jefferson

View raw message