This is the mail archive of the cygwin-developers@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Winsock closesocket() problem


Jason Tishler wrote:
> 
> Pierre and I have been working (privately) to solve the exim problem
> that I mentioned in the following post:
> 
>     http://cygwin.com/ml/cygwin-developers/2003-02/msg00125.html
> 
> It appears that under certain conditions Winsock's closesocket() is not
> happy closing a socket more than once.  See the attached test case,
> sc9.cc, which demonstrates the problem when run under LocalSystem:
> 
>     $ sc9
>     close(fd2) failed with 108
> 
> Note that the problem follows the second close().  If I switch the order
> of the close() calls, then dup()-ed socket closes without any errors.
> Hence, I don't believe that this problem is directly related to dup().

and then closing the original socket fails. Correct?

> I have worked around the problem with the attached patch to
> fhandler_socket::close().  Is this a reasonable way to solve this
> problem?  Or, does anyone have any other suggestions?

Jason,

last time we talked you indicated that the socket was in fact not closed.
Do you know think it is closed but Windows errs in reporting an error?

Pierre


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]