* select.cc (start_thread_socket): Clean up exitsock in case of error. Use
si->exitcode consistently.
This commit is contained in:
parent
f383bda56a
commit
9905786a04
|
@ -1,3 +1,9 @@
|
|||
2006-05-23 Lev Bishop <lev.bishop+cygwin@gmail.com>
|
||||
Christopher Faylor <cgf@timesys.com>
|
||||
|
||||
* select.cc (start_thread_socket): Clean up exitsock in case of
|
||||
error. Use si->exitcode consistently.
|
||||
|
||||
2006-05-21 Christopher Faylor <cgf@timesys.com>
|
||||
|
||||
* child_info.h (_CI_SAW_CTRL_C): New enum.
|
||||
|
|
|
@ -1406,7 +1406,7 @@ start_thread_socket (select_record *me, select_stuff *stuff)
|
|||
else
|
||||
{
|
||||
si->exitsock = _my_tls.locals.exitsock = socket (AF_INET, SOCK_DGRAM, IPPROTO_UDP);
|
||||
if (_my_tls.locals.exitsock == INVALID_SOCKET)
|
||||
if (si->exitsock == INVALID_SOCKET)
|
||||
{
|
||||
set_winsock_errno ();
|
||||
select_printf ("cannot create socket, %E");
|
||||
|
@ -1431,7 +1431,7 @@ start_thread_socket (select_record *me, select_stuff *stuff)
|
|||
SetHandleInformation ((HANDLE) si->exitsock, HANDLE_FLAG_INHERIT, 0);
|
||||
/* else
|
||||
too bad? */
|
||||
select_printf ("opened new socket %p", _my_tls.locals.exitsock);
|
||||
select_printf ("opened new socket %p", si->exitsock);
|
||||
}
|
||||
|
||||
select_printf ("exitsock %p", si->exitsock);
|
||||
|
@ -1446,6 +1446,7 @@ start_thread_socket (select_record *me, select_stuff *stuff)
|
|||
err:
|
||||
set_winsock_errno ();
|
||||
closesocket (si->exitsock);
|
||||
si->exitsock = INVALID_SOCKET;
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue