[gnome-terminal] Use child_pid, not the foreground pid, to get the cwd



commit 2be045ae15d03fe4d97cd3c80ee86b553eff6432
Author: Christian Persch <chpe gnome org>
Date:   Wed Jul 22 17:10:58 2009 +0200

    Use child_pid, not the foreground pid, to get the cwd
    
    Go back to using the primary child to determine the cwd, instead of the foreground pid.
    This fixes e.g. the cwd being set nondeterministically in new tabs when running 'find'
    in the current tab.

 src/terminal-screen.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/terminal-screen.c b/src/terminal-screen.c
index 1aa0c05..f62ddd2 100644
--- a/src/terminal-screen.c
+++ b/src/terminal-screen.c
@@ -1806,10 +1806,12 @@ terminal_screen_get_current_dir (TerminalScreen *screen)
   char *cwd;
 
   if (priv->pty_fd != -1) {
+#if 0
     /* Get the foreground process ID */
     cwd = cwd_of_pid (tcgetpgrp (priv->pty_fd));
     if (cwd != NULL)
       return cwd;
+#endif
 
     /* If that didn't work, try falling back to the primary child. See bug #575184. */
     cwd = cwd_of_pid (priv->child_pid);



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