Author: miguel
Date: 2006-11-18 11:40:25 -0500 (Sat, 18 Nov 2006)
New Revision: 68124
Modified:
trunk/mono/support/ChangeLog
trunk/mono/support/serial.c
Log:
2006-11-18 Miguel de Icaza <[EMAIL PROTECTED]>
* serial.c (poll_serial): Do not report an error for EINTR.
Modified: trunk/mono/support/ChangeLog
===================================================================
--- trunk/mono/support/ChangeLog 2006-11-18 16:33:52 UTC (rev 68123)
+++ trunk/mono/support/ChangeLog 2006-11-18 16:40:25 UTC (rev 68124)
@@ -1,3 +1,7 @@
+2006-11-18 Miguel de Icaza <[EMAIL PROTECTED]>
+
+ * serial.c (poll_serial): Do not report an error for EINTR.
+
2006-11-18 Jelle Hissink <[EMAIL PROTECTED]>
* serial.c (poll_serial): Add timeout parameter to poll.
Modified: trunk/mono/support/serial.c
===================================================================
--- trunk/mono/support/serial.c 2006-11-18 16:33:52 UTC (rev 68123)
+++ trunk/mono/support/serial.c 2006-11-18 16:40:25 UTC (rev 68124)
@@ -11,6 +11,7 @@
#include <string.h>
#include <sys/poll.h>
#include <sys/ioctl.h>
+#include <errno.h>
#include <glib.h>
@@ -333,6 +334,9 @@
pinfo.revents = 0;
if (poll (&pinfo, 1, timeout) == -1) {
+ /* EINTR is an OK condition, we should not throw in the upper
layer an IOException */
+ if (errno == EINTR)
+ return FALSE;
*error = -1;
return FALSE;
}
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches