[patch] Fix for the project loading bug
- From: Gustavo Giráldez <gustavo giraldez gmx net>
- To: JP Rosevear <jpr ximian com>
- Cc: Gnome Devtools list <gnome-devtools gnome org>
- Subject: [patch] Fix for the project loading bug
- Date: 10 Oct 2002 20:14:58 -0300
Hi JP,
I just committed the attached patch to gnome-build which fixes the bug
exposed in the last few days.
Regards,
Gustavo
? .tm_project.cache
? autom4te.cache
? stamp-h1
? idl/Makefile
? idl/Makefile.in
? src/controls/gbf-project-model.c
? src/controls/gbf-project-model.h
? src/controls/gbf-project-tree.c.sort
? src/controls/gbf-project-view.c
? src/controls/gbf-project-view.h
? src/controls/test-project-view
? src/controls/test-project-view.c
? src/lib/gnome-build-common.c
? src/lib/gnome-build-skels.c
? src/lib/gnome-build-stubs.c
? src/lib/gnome-build.h
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gnome-build/ChangeLog,v
retrieving revision 1.111
diff -u -r1.111 ChangeLog
--- ChangeLog 28 Sep 2002 12:08:53 -0000 1.111
+++ ChangeLog 10 Oct 2002 23:10:34 -0000
@@ -1,3 +1,11 @@
+2002-10-10 Gustavo Giraldez <gustavo giraldez gmx net>
+
+ * src/backends/libgbf_am/gbf-am-project.c (write_child),
+ (read_output), (read_error), (spawn_script): Handle the case when
+ the condition is a bitwise combination of G_IO_* values. If by
+ the time the script has exited the watches are not yet removed,
+ perform one more main loop iteration to flush any pending data.
+
2002-09-28 Jeroen Zwartepoorte <jeroen xs4all nl>
* src/backends/libgbf_am/gbf-am-build.c: (build_msg),
Index: src/backends/libgbf_am/gbf-am-project.c
===================================================================
RCS file: /cvs/gnome/gnome-build/src/backends/libgbf_am/gbf-am-project.c,v
retrieving revision 1.32
diff -u -r1.32 gbf-am-project.c
--- src/backends/libgbf_am/gbf-am-project.c 28 Sep 2002 12:08:53 -0000 1.32
+++ src/backends/libgbf_am/gbf-am-project.c 10 Oct 2002 23:10:38 -0000
@@ -1040,12 +1040,9 @@
GbfAmSpawnData *data = user_data;
gboolean retval = FALSE;
- if (condition == G_IO_HUP || condition == G_IO_NVAL)
- return FALSE;
-
/* reset timeout */
data->ticks = 0;
- if (condition == G_IO_OUT) {
+ if (condition & G_IO_OUT) {
gsize bytes_written;
GIOStatus status;
GError *error = NULL;
@@ -1100,12 +1097,9 @@
GbfAmSpawnData *data = user_data;
gboolean retval = FALSE;
- if (condition == G_IO_HUP || condition == G_IO_NVAL)
- return FALSE;
-
/* reset timeout */
data->ticks = 0;
- if (condition == G_IO_IN || condition == G_IO_PRI) {
+ if (condition & (G_IO_IN | G_IO_PRI)) {
gsize bytes_read;
GIOStatus status;
GError *error = NULL;
@@ -1170,12 +1164,9 @@
GbfAmSpawnData *data = user_data;
gboolean retval = FALSE;
- if (condition == G_IO_HUP || condition == G_IO_NVAL)
- return FALSE;
-
/* reset timeout */
data->ticks = 0;
- if (condition == G_IO_IN || condition == G_IO_PRI) {
+ if (condition & (G_IO_IN | G_IO_PRI)) {
gsize bytes_read;
GIOStatus status;
GError *error = NULL;
@@ -1316,6 +1307,11 @@
g_timeout_add (CHECK_TIMEOUT, (GSourceFunc) check_child, data);
g_main_loop_run (data->main_loop);
+
+ /* do one more iteration to flush pending reads */
+ if (data->output_source || data->error_source)
+ g_main_context_iteration (g_main_loop_get_context (data->main_loop),
+ FALSE);
/* close channels and remove io watches */
shutdown_spawn (data);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]