From: Sebastian Wilhelmi Date: Tue, 9 Mar 2004 00:12:36 +0000 (+0000) Subject: Do not run the g_child_watch_* test multi-threaded, as that doesn't work X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=5f487e36477dfaf7414db32681d92593a8f39fdd;p=dana%2Fcg-glib.git Do not run the g_child_watch_* test multi-threaded, as that doesn't work 2004-03-09 Sebastian Wilhelmi * tests/child-test.c: Do not run the g_child_watch_* test multi-threaded, as that doesn't work on linux prior 2.6. Fixes #136539. --- diff --git a/ChangeLog b/ChangeLog index 9825ee09..e57eecb3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-03-09 Sebastian Wilhelmi + + * tests/child-test.c: Do not run the g_child_watch_* test + multi-threaded, as that doesn't work on linux prior 2.6. Fixes + #136539. + 2004-03-08 Alastair McKinstry * configure.in: Added "ga" (Irish) to ALL_LINGUAS. diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 9825ee09..e57eecb3 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,9 @@ +2004-03-09 Sebastian Wilhelmi + + * tests/child-test.c: Do not run the g_child_watch_* test + multi-threaded, as that doesn't work on linux prior 2.6. Fixes + #136539. + 2004-03-08 Alastair McKinstry * configure.in: Added "ga" (Irish) to ALL_LINGUAS. diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index 9825ee09..e57eecb3 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,9 @@ +2004-03-09 Sebastian Wilhelmi + + * tests/child-test.c: Do not run the g_child_watch_* test + multi-threaded, as that doesn't work on linux prior 2.6. Fixes + #136539. + 2004-03-08 Alastair McKinstry * configure.in: Added "ga" (Irish) to ALL_LINGUAS. diff --git a/ChangeLog.pre-2-4 b/ChangeLog.pre-2-4 index 9825ee09..e57eecb3 100644 --- a/ChangeLog.pre-2-4 +++ b/ChangeLog.pre-2-4 @@ -1,3 +1,9 @@ +2004-03-09 Sebastian Wilhelmi + + * tests/child-test.c: Do not run the g_child_watch_* test + multi-threaded, as that doesn't work on linux prior 2.6. Fixes + #136539. + 2004-03-08 Alastair McKinstry * configure.in: Added "ga" (Irish) to ALL_LINGUAS. diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index 9825ee09..e57eecb3 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,9 @@ +2004-03-09 Sebastian Wilhelmi + + * tests/child-test.c: Do not run the g_child_watch_* test + multi-threaded, as that doesn't work on linux prior 2.6. Fixes + #136539. + 2004-03-08 Alastair McKinstry * configure.in: Added "ga" (Irish) to ALL_LINGUAS. diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index 9825ee09..e57eecb3 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,9 @@ +2004-03-09 Sebastian Wilhelmi + + * tests/child-test.c: Do not run the g_child_watch_* test + multi-threaded, as that doesn't work on linux prior 2.6. Fixes + #136539. + 2004-03-08 Alastair McKinstry * configure.in: Added "ga" (Irish) to ALL_LINGUAS. diff --git a/tests/child-test.c b/tests/child-test.c index e7d7daf9..37296b46 100644 --- a/tests/child-test.c +++ b/tests/child-test.c @@ -104,6 +104,7 @@ child_watch_callback (GPid pid, gint status, gpointer data) return TRUE; } +#ifdef TEST_THREAD static gpointer test_thread (gpointer data) { @@ -126,6 +127,7 @@ test_thread (gpointer data) return NULL; } +#endif int main (int argc, char *argv[]) @@ -148,7 +150,11 @@ main (int argc, char *argv[]) * implementation is available. */ #if defined(G_THREADS_ENABLED) && ! defined(G_THREADS_IMPL_NONE) - g_thread_init (NULL); +#ifdef TEST_THREAD + g_thread_init (NULL); +#else + GPid pid; +#endif main_loop = g_main_loop_new (NULL, FALSE); #ifdef G_OS_WIN32 @@ -158,8 +164,15 @@ main (int argc, char *argv[]) #endif alive = 2; +#ifdef TEST_THREAD g_thread_create (test_thread, GINT_TO_POINTER (10), FALSE, NULL); g_thread_create (test_thread, GINT_TO_POINTER (20), FALSE, NULL); +#else + pid = get_a_child (10); + g_child_watch_add (pid, child_watch_callback, GINT_TO_POINTER (10)); + pid = get_a_child (20); + g_child_watch_add (pid, child_watch_callback, GINT_TO_POINTER (20)); +#endif g_main_loop_run (main_loop);