From 1266a4b88ac7e2b461c10b5055f435be24aa640a Mon Sep 17 00:00:00 2001 From: Sebastian Wilhelmi Date: Mon, 20 Mar 2000 16:19:58 +0000 Subject: [PATCH] Warn in case of an error during the call to poll(2). Closes Bug#7564 as 2000-03-20 Sebastian Wilhelmi * 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 . --- ChangeLog | 4 ++++ ChangeLog.pre-2-0 | 4 ++++ ChangeLog.pre-2-10 | 4 ++++ ChangeLog.pre-2-12 | 4 ++++ ChangeLog.pre-2-2 | 4 ++++ ChangeLog.pre-2-4 | 4 ++++ ChangeLog.pre-2-6 | 4 ++++ ChangeLog.pre-2-8 | 4 ++++ glib/gmain.c | 4 +++- gmain.c | 4 +++- 10 files changed, 38 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index b15f5ba..f9d9690 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2000-03-20 Sebastian Wilhelmi + * 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 + . + * 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 diff --git a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0 index b15f5ba..f9d9690 100644 --- a/ChangeLog.pre-2-0 +++ b/ChangeLog.pre-2-0 @@ -1,5 +1,9 @@ 2000-03-20 Sebastian Wilhelmi + * 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 + . + * 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 diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index b15f5ba..f9d9690 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,5 +1,9 @@ 2000-03-20 Sebastian Wilhelmi + * 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 + . + * 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 diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index b15f5ba..f9d9690 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,5 +1,9 @@ 2000-03-20 Sebastian Wilhelmi + * 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 + . + * 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 diff --git a/ChangeLog.pre-2-2 b/ChangeLog.pre-2-2 index b15f5ba..f9d9690 100644 --- a/ChangeLog.pre-2-2 +++ b/ChangeLog.pre-2-2 @@ -1,5 +1,9 @@ 2000-03-20 Sebastian Wilhelmi + * 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 + . + * 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 diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index b15f5ba..f9d9690 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,5 +1,9 @@ 2000-03-20 Sebastian Wilhelmi + * 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 + . + * 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 diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index b15f5ba..f9d9690 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,5 +1,9 @@ 2000-03-20 Sebastian Wilhelmi + * 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 + . + * 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 diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index b15f5ba..f9d9690 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,5 +1,9 @@ 2000-03-20 Sebastian Wilhelmi + * 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 + . + * 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 diff --git a/glib/gmain.c b/glib/gmain.c index a3b1834..a2ca73a 100644 --- a/glib/gmain.c +++ b/glib/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 diff --git a/gmain.c b/gmain.c index a3b1834..a2ca73a 100644 --- 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 -- 2.7.4