Index: python/vte-demo.py
===================================================================
--- python/vte-demo.py	(revision 2023)
+++ python/vte-demo.py	(working copy)
@@ -16,7 +16,8 @@
 	print "A portion of the text at restore-time is:"
 	print text
 
-def child_exited_cb(terminal):
+def child_exited_cb(terminal, pid, status):
+	print >>sys.stderr, "Child %r exited: %r" % (pid, status)
 	gtk.main_quit()
 
 if __name__ == '__main__':
@@ -76,7 +77,7 @@
 	terminal.set_scrollback_lines(scrollback)
 	terminal.set_audible_bell(audible)
 	terminal.set_visible_bell(visible)
-	terminal.connect("child-exited", child_exited_cb)
+	terminal.connect("child-exited-status", child_exited_cb)
 	terminal.connect("restore-window", restore_cb)
 	if (command):
 		# Start up the specified command.
Index: src/vte.c
===================================================================
--- src/vte.c	(revision 2023)
+++ src/vte.c	(working copy)
@@ -847,11 +847,12 @@
 
 /* Emit a "child-exited" signal. */
 static void
-vte_terminal_emit_child_exited(VteTerminal *terminal)
+vte_terminal_emit_child_exited(VteTerminal *terminal, int pid, int status)
 {
 	_vte_debug_print(VTE_DEBUG_SIGNALS,
 			"Emitting `child-exited'.\n");
 	g_signal_emit_by_name(terminal, "child-exited");
+	g_signal_emit_by_name(terminal, "child-exited-status", pid, status);	
 }
 
 /* Emit a "contents_changed" signal. */
@@ -2783,7 +2784,7 @@
 		_vte_buffer_clear(terminal->pvt->outgoing);
 
 		/* Tell observers what's happened. */
-		vte_terminal_emit_child_exited(terminal);
+		vte_terminal_emit_child_exited(terminal, pid, status);
 	}
 }
 
@@ -10531,6 +10532,15 @@
 			     NULL,
 			     _vte_marshal_VOID__VOID,
 			     G_TYPE_NONE, 0);
+	klass->child_exited_status_signal =
+		g_signal_new("child-exited-status",
+			     G_OBJECT_CLASS_TYPE(klass),
+			     G_SIGNAL_RUN_LAST,
+			     G_STRUCT_OFFSET(VteTerminalClass, child_exited),
+			     NULL,
+			     NULL,
+			     _vte_marshal_VOID__INT_INT,
+			     G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_INT);	     
 	klass->window_title_changed_signal =
 		g_signal_new("window-title-changed",
 			     G_OBJECT_CLASS_TYPE(klass),
Index: src/vte.h
===================================================================
--- src/vte.h	(revision 2023)
+++ src/vte.h	(working copy)
@@ -63,6 +63,7 @@
 	/* Default signal handlers. */
 	void (*eof)(VteTerminal* terminal);
 	void (*child_exited)(VteTerminal* terminal);
+	void (*child_exited_status)(VteTerminal* terminal, gint pid, gint status);
 	void (*emulation_changed)(VteTerminal* terminal);
 	void (*encoding_changed)(VteTerminal* terminal);
 	void (*char_size_changed)(VteTerminal* terminal, guint char_width, guint char_height);
@@ -104,6 +105,7 @@
 	/* Signals we might emit. */
 	guint eof_signal;
 	guint child_exited_signal;
+	guint child_exited_status_signal;	
 	guint emulation_changed_signal;
 	guint encoding_changed_signal;
 	guint char_size_changed_signal;
