diff options
author | Miguel de Icaza <miguel@gnome.org> | 2006-11-18 19:40:25 +0300 |
---|---|---|
committer | Miguel de Icaza <miguel@gnome.org> | 2006-11-18 19:40:25 +0300 |
commit | d7aac05b28a1d6cdc647a12254cbcbf96b727902 (patch) | |
tree | ace71ab88311718dbb9c5af1ae108a4a81f1be0c /support | |
parent | 48082bacde0b5f9af21912624f72051c0e2b2f0f (diff) |
2006-11-18 Miguel de Icaza <miguel@novell.com>
* serial.c (poll_serial): Do not report an error for EINTR.
svn path=/trunk/mono/; revision=68124
Diffstat (limited to 'support')
-rw-r--r-- | support/ChangeLog | 4 | ||||
-rw-r--r-- | support/serial.c | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/support/ChangeLog b/support/ChangeLog index 1eddf6e8920..4fc1bfecab1 100644 --- a/support/ChangeLog +++ b/support/ChangeLog @@ -1,3 +1,7 @@ +2006-11-18 Miguel de Icaza <miguel@novell.com> + + * serial.c (poll_serial): Do not report an error for EINTR. + 2006-11-18 Jelle Hissink <Jelle.Hissink@C-it.nl> * serial.c (poll_serial): Add timeout parameter to poll. diff --git a/support/serial.c b/support/serial.c index 69f3a76ccec..34d3943142d 100644 --- a/support/serial.c +++ b/support/serial.c @@ -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 @@ poll_serial (int fd, gint32 *error, int timeout) 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; } |