Index: ChangeLog
===================================================================
--- ChangeLog	(révision 2088)
+++ ChangeLog	(copie de travail)
@@ -1,3 +1,8 @@
+2008-08-20  Sébastien Granjoux  <seb.sfo@free.fr>
+
+	* src/vte.c:
+	Bug 538344 – Anjuta hangs when program is executed in terminal
+
 2008-08-20  Christian Persch  <chpe@gnome.org>
 
 	* src/vte.c: (vte_terminal_match_check_internal_gregex): Plug a mem
Index: src/vte.c
===================================================================
--- src/vte.c	(révision 2088)
+++ src/vte.c	(copie de travail)
@@ -3171,7 +3171,8 @@
 _vte_terminal_connect_pty_write(VteTerminal *terminal)
 {
 	if (terminal->pvt->pty_channel == NULL) {
-		return;
+		terminal->pvt->pty_channel =
+			g_io_channel_unix_new(terminal->pvt->pty_master);
 	}
 
 	if (terminal->pvt->pty_output_source == VTE_INVALID_SOURCE) {
@@ -3238,10 +3239,12 @@
 	/* Close any existing ptys. */
 	if (terminal->pvt->pty_channel != NULL) {
 		g_io_channel_unref (terminal->pvt->pty_channel);
+		terminal->pvt->pty_channel = NULL;
 	}
 	if (terminal->pvt->pty_master != -1) {
 		_vte_pty_close(terminal->pvt->pty_master);
 		close(terminal->pvt->pty_master);
+		terminal->pvt->pty_master = -1;
 	}
 
 	/* Open the new pty. */
