gnome-terminal r3264 - trunk/src



Author: chpe
Date: Wed Dec 24 22:34:52 2008
New Revision: 3264
URL: http://svn.gnome.org/viewvc/gnome-terminal?rev=3264&view=rev

Log:
chdir() to /home/chpe in the factory process, so we don't hog any mountpoints. Bug #565328, based on a patch by Mads Chr. Olesen.

Modified:
   trunk/src/terminal.c

Modified: trunk/src/terminal.c
==============================================================================
--- trunk/src/terminal.c	(original)
+++ trunk/src/terminal.c	Wed Dec 24 22:34:52 2008
@@ -22,6 +22,7 @@
 #include <config.h>
 
 #include <glib.h>
+#include <glib/gstdio.h>
 
 #include <stdlib.h>
 #include <time.h>
@@ -215,8 +216,7 @@
   int i;
   char **argv_copy;
   int argc_copy;
-  const char *startup_id;
-  const char *display_name;
+  const char *startup_id, *display_name, *home_dir;
   GdkDisplay *display;
   TerminalOptions *options;
   DBusGConnection *connection;
@@ -440,6 +440,13 @@
   terminal_app_handle_options (terminal_app_get (), options, NULL);
   terminal_options_free (options);
 
+  /* Now change directory to $HOME so we don't prevent unmounting, e.g. if the
+   * factory is started by nautilus-open-terminal. See bug #565328.
+   */
+  home_dir = g_get_home_dir ();
+  if (home_dir)
+    g_chdir (home_dir);
+
   gtk_main ();
 
   terminal_app_shutdown ();



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