Warn in case of an error during the call to poll(2). Closes Bug#7564 as
authorSebastian Wilhelmi <wilhelmi@ira.uka.de>
Mon, 20 Mar 2000 16:19:58 +0000 (16:19 +0000)
committerSebastian Wilhelmi <wilhelmi@src.gnome.org>
Mon, 20 Mar 2000 16:19:58 +0000 (16:19 +0000)
2000-03-20  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>

* gmain.c (g_main_poll): Warn in case of an error during the call
to poll(2). Closes Bug#7564 as reported by David Helder
<dhelder@umich.edu>.

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-12
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
glib/gmain.c
gmain.c

index b15f5ba..f9d9690 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2000-03-20  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
 
+       * gmain.c (g_main_poll): Warn in case of an error during the call
+       to poll(2). Closes Bug#7564 as reported by David Helder
+       <dhelder@umich.edu>.
+
        * gutils.c (g_get_current_dir): Make g_get_current_dir work on
        systems with unlimited pathname length like the HURD (It worked
        there before, but only for pathes shorter than 2048). Closes
index b15f5ba..f9d9690 100644 (file)
@@ -1,5 +1,9 @@
 2000-03-20  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
 
+       * gmain.c (g_main_poll): Warn in case of an error during the call
+       to poll(2). Closes Bug#7564 as reported by David Helder
+       <dhelder@umich.edu>.
+
        * gutils.c (g_get_current_dir): Make g_get_current_dir work on
        systems with unlimited pathname length like the HURD (It worked
        there before, but only for pathes shorter than 2048). Closes
index b15f5ba..f9d9690 100644 (file)
@@ -1,5 +1,9 @@
 2000-03-20  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
 
+       * gmain.c (g_main_poll): Warn in case of an error during the call
+       to poll(2). Closes Bug#7564 as reported by David Helder
+       <dhelder@umich.edu>.
+
        * gutils.c (g_get_current_dir): Make g_get_current_dir work on
        systems with unlimited pathname length like the HURD (It worked
        there before, but only for pathes shorter than 2048). Closes
index b15f5ba..f9d9690 100644 (file)
@@ -1,5 +1,9 @@
 2000-03-20  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
 
+       * gmain.c (g_main_poll): Warn in case of an error during the call
+       to poll(2). Closes Bug#7564 as reported by David Helder
+       <dhelder@umich.edu>.
+
        * gutils.c (g_get_current_dir): Make g_get_current_dir work on
        systems with unlimited pathname length like the HURD (It worked
        there before, but only for pathes shorter than 2048). Closes
index b15f5ba..f9d9690 100644 (file)
@@ -1,5 +1,9 @@
 2000-03-20  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
 
+       * gmain.c (g_main_poll): Warn in case of an error during the call
+       to poll(2). Closes Bug#7564 as reported by David Helder
+       <dhelder@umich.edu>.
+
        * gutils.c (g_get_current_dir): Make g_get_current_dir work on
        systems with unlimited pathname length like the HURD (It worked
        there before, but only for pathes shorter than 2048). Closes
index b15f5ba..f9d9690 100644 (file)
@@ -1,5 +1,9 @@
 2000-03-20  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
 
+       * gmain.c (g_main_poll): Warn in case of an error during the call
+       to poll(2). Closes Bug#7564 as reported by David Helder
+       <dhelder@umich.edu>.
+
        * gutils.c (g_get_current_dir): Make g_get_current_dir work on
        systems with unlimited pathname length like the HURD (It worked
        there before, but only for pathes shorter than 2048). Closes
index b15f5ba..f9d9690 100644 (file)
@@ -1,5 +1,9 @@
 2000-03-20  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
 
+       * gmain.c (g_main_poll): Warn in case of an error during the call
+       to poll(2). Closes Bug#7564 as reported by David Helder
+       <dhelder@umich.edu>.
+
        * gutils.c (g_get_current_dir): Make g_get_current_dir work on
        systems with unlimited pathname length like the HURD (It worked
        there before, but only for pathes shorter than 2048). Closes
index b15f5ba..f9d9690 100644 (file)
@@ -1,5 +1,9 @@
 2000-03-20  Sebastian Wilhelmi  <wilhelmi@ira.uka.de>
 
+       * gmain.c (g_main_poll): Warn in case of an error during the call
+       to poll(2). Closes Bug#7564 as reported by David Helder
+       <dhelder@umich.edu>.
+
        * gutils.c (g_get_current_dir): Make g_get_current_dir work on
        systems with unlimited pathname length like the HURD (It worked
        there before, but only for pathes shorter than 2048). Closes
index a3b1834..a2ca73a 100644 (file)
@@ -1034,7 +1034,9 @@ g_main_poll (gint     timeout,
 #endif
       
       G_UNLOCK (main_loop);
-      (*poll_func) (fd_array, npoll, timeout);
+      if ((*poll_func) (fd_array, npoll, timeout) < 0)
+       g_warning ("poll(2) failed due to: %s.",
+                  g_strerror (errno));
       G_LOCK (main_loop);
       
 #ifdef G_MAIN_POLL_DEBUG
diff --git a/gmain.c b/gmain.c
index a3b1834..a2ca73a 100644 (file)
--- a/gmain.c
+++ b/gmain.c
@@ -1034,7 +1034,9 @@ g_main_poll (gint     timeout,
 #endif
       
       G_UNLOCK (main_loop);
-      (*poll_func) (fd_array, npoll, timeout);
+      if ((*poll_func) (fd_array, npoll, timeout) < 0)
+       g_warning ("poll(2) failed due to: %s.",
+                  g_strerror (errno));
       G_LOCK (main_loop);
       
 #ifdef G_MAIN_POLL_DEBUG