[gnome-terminal/gsettings] server: On Launch first check if there's already a child process



commit 53f1ddf9c60a7cfbb691d42f34fe199f66cd7a21
Author: Christian Persch <chpe gnome org>
Date:   Mon Apr 16 13:06:02 2012 +0200

    server: On Launch first check if there's already a child process

 src/terminal-screen.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/terminal-screen.c b/src/terminal-screen.c
index cee03a6..9afad16 100644
--- a/src/terminal-screen.c
+++ b/src/terminal-screen.c
@@ -1359,6 +1359,12 @@ terminal_screen_do_exec (TerminalScreen *screen,
   GSpawnFlags spawn_flags = 0;
   GPid pid;
 
+  if (priv->child_pid != -1) {
+    g_set_error_literal (error, G_DBUS_ERROR, G_DBUS_ERROR_FAILED,
+                         "Cannot launch a new child process while the terminal is still running another child process");
+    return FALSE;
+  }
+
   priv->launch_child_source_id = 0;
 
   _terminal_debug_print (TERMINAL_DEBUG_PROCESSES,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]