[Mono-bugs] [Bug 74842][Maj] Changed - Stopping a listener doesn't break out of an AcceptSocket() call

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Fri, 6 May 2005 05:47:45 -0400 (EDT)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by gonzalo@ximian.com.

http://bugzilla.ximian.com/show_bug.cgi?id=74842

--- shadow/74842	2005-05-06 04:56:18.000000000 -0400
+++ shadow/74842.tmp.4070	2005-05-06 05:47:45.000000000 -0400
@@ -70,6 +70,15 @@
 So the only option left is poll() + timeout before accept(), which
 works fine but is subject to race conditions if someone else opens
 after we close this socket.
 
 I'm going to keep try a decent solution, if not, i guess poll()+a
 short timeout is going to be it.
+
+------- Additional Comments From gonzalo@ximian.com  2005-05-06 05:47 -------
+Calling Poll() before Accept on the Socket also hangs.
+Poll() is implemented using select().
+
+Given that only Begin/EndAccept + epoll seems to work, I think I'll
+change Accept to use those and handle the seletc/poll case in
+mono_thread_pool_remove_socket and dispatch any pending IO operation
+as we do for epoll.