shill: Make errors on a GLib IOChannel fail on read() instead of poll()

GLib IO channel handlers are entered with the condition G_IO_ERR ( ==
POLLERR) when the monitored file descriptor encounters an error
condition. However, just like with a regular poll(), the socket's actual
error number is not communicated by that and must be read explicitly.

It is therefore not useful for debugging to immediately die when seeing
a G_IO_ERR condition. This patch changes the respective fatal error
messages to warnings, so that execution may continue in the same way it
would on a normal G_IO_IN ( == POLLIN). This will ultimately lead to a
read() or similar call on the file descriptor, which should then fail
with a more useful error message that includes the socket's error
number.

BUG=chromium-os:36328
TEST=None

Change-Id: If8bba9990b836546dc17d92bfd51cb47ea02d518
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/38182
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
diff --git a/glib_io_ready_handler.cc b/glib_io_ready_handler.cc
index 7e1fc63..cdd456d 100644
--- a/glib_io_ready_handler.cc
+++ b/glib_io_ready_handler.cc
@@ -23,7 +23,7 @@
   gint fd = g_io_channel_unix_get_fd(chan);
 
   if (cond & (G_IO_NVAL | G_IO_HUP | G_IO_ERR))
-    LOG(FATAL) << "Unexpected GLib error condition " << cond << " on poll("
+    LOG(WARNING) << "Unexpected GLib error condition " << cond << " on poll("
                << fd << "): " << strerror(errno);
 
   handler->callback().Run(fd);