comparison src/w32.c @ 74786:4f26e07fd85d

(_sys_wait_accept): Fix handle leak.
author Kim F. Storm <storm@cua.dk>
date Thu, 21 Dec 2006 12:47:06 +0000
parents acfcb86a7b5e
children 357bd3ca981a
comparison
equal deleted inserted replaced
74785:98b7d08f05e3 74786:4f26e07fd85d
3696 rc = pfn_WSAEventSelect (SOCK_HANDLE (fd), hEv, FD_ACCEPT); 3696 rc = pfn_WSAEventSelect (SOCK_HANDLE (fd), hEv, FD_ACCEPT);
3697 if (rc != SOCKET_ERROR) 3697 if (rc != SOCKET_ERROR)
3698 { 3698 {
3699 rc = WaitForSingleObject (hEv, INFINITE); 3699 rc = WaitForSingleObject (hEv, INFINITE);
3700 pfn_WSAEventSelect (SOCK_HANDLE (fd), NULL, 0); 3700 pfn_WSAEventSelect (SOCK_HANDLE (fd), NULL, 0);
3701 pfn_WSACloseEvent (hEv);
3702 if (rc == WAIT_OBJECT_0) 3701 if (rc == WAIT_OBJECT_0)
3703 cp->status = STATUS_READ_SUCCEEDED; 3702 cp->status = STATUS_READ_SUCCEEDED;
3704 } 3703 }
3704 pfn_WSACloseEvent (hEv);
3705 3705
3706 return cp->status; 3706 return cp->status;
3707 } 3707 }
3708 3708
3709 int 3709 int
4125 { 4125 {
4126 /* Shut down cleanly, making sure autosave files are up to date. */ 4126 /* Shut down cleanly, making sure autosave files are up to date. */
4127 shut_down_emacs (0, 0, Qnil); 4127 shut_down_emacs (0, 0, Qnil);
4128 } 4128 }
4129 4129
4130 /* Allow other handlers to handle this signal. */ 4130 /* Allow other handlers to handle this signal. */
4131 return FALSE; 4131 return FALSE;
4132 } 4132 }
4133 4133
4134 /* 4134 /*
4135 globals_of_w32 is used to initialize those global variables that 4135 globals_of_w32 is used to initialize those global variables that