* fhandler_socket.cc (fhandler_socket::dup): Decrement dtable's
need_fixup_before counter on successful dup. * net.cc (cygwin_getpeername): Add file descriptor to debug output.
This commit is contained in:
parent
6a19fd82fa
commit
82b3018088
|
@ -1,3 +1,9 @@
|
|||
2004-08-19 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* fhandler_socket.cc (fhandler_socket::dup): Decrement dtable's
|
||||
need_fixup_before counter on successful dup.
|
||||
* net.cc (cygwin_getpeername): Add file descriptor to debug output.
|
||||
|
||||
2004-08-17 Pierre Humblet <pierre.humblet@ieee.org>
|
||||
|
||||
* fhandler.h (fhandler_dev_dsp:~fhandler_dev_dsp): Delete.
|
||||
|
|
|
@ -344,7 +344,10 @@ fhandler_socket::dup (fhandler_base *child)
|
|||
{
|
||||
fhs->fixup_after_fork (hMainProc);
|
||||
if (fhs->get_io_handle() != (HANDLE) INVALID_SOCKET)
|
||||
return 0;
|
||||
{
|
||||
cygheap->fdtab.inc_need_fixup_before ();
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
debug_printf ("WSADuplicateSocket failed, trying DuplicateHandle");
|
||||
}
|
||||
|
@ -363,6 +366,7 @@ fhandler_socket::dup (fhandler_base *child)
|
|||
}
|
||||
VerifyHandle (nh);
|
||||
fhs->set_io_handle (nh);
|
||||
cygheap->fdtab.inc_need_fixup_before ();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -1170,7 +1170,7 @@ cygwin_getpeername (int fd, struct sockaddr *name, int *len)
|
|||
else
|
||||
res = fh->getpeername (name, len);
|
||||
|
||||
syscall_printf ("%d = getpeername %d", res, (fh ? fh->get_socket () : -1));
|
||||
syscall_printf ("%d = getpeername (%d) %d", res, fd, (fh ? fh->get_socket () : -1));
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue