Changeset 12270


Ignore:
Timestamp:
Jun 21, 2009, 1:06:29 AM (10 years ago)
Author:
gb
Message:

In windows_close(), try to closesocket() first; if that fails
with a WSAENotSock ("not a socket") error, fall into the
more general CloseHandle?() case. (closesocket() closes the
handle if successful.)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/lisp-kernel/windows-calls.c

    r12199 r12270  
    273273lisp_close(HANDLE hfile)
    274274{
     275  int err;
     276
     277  if (closesocket((SOCKET)hfile) == 0) {
     278    return 0;
     279  }
     280
     281  err = WSAGetLastError();
     282  if (err != WSAENOTSOCK) {
     283    _dosmaperr(err);
     284    return -1;
     285  }
    275286  if (CloseHandle(hfile)) {
    276287    return 0;
Note: See TracChangeset for help on using the changeset viewer.