From 7a0f4c45efe23a110ff206ceb18e8fcee2ef089d Mon Sep 17 00:00:00 2001 From: "Andrew V. Samoilov" Date: Tue, 7 Jun 2005 09:05:09 +0000 Subject: [PATCH] * subshell.c (exit_subshell): Do not blindly perform cleanup. --- src/ChangeLog | 4 ++++ src/subshell.c | 20 +++++++++++--------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 867b6e543..9aa4ae13e 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2005-06-07 Pavel Tsekov + + * subshell.c (exit_subshell): Do not blindly perform cleanup. + 2005-06-07 Roland Illig * view.c (view_ccache_lookup): Replaced the min_nroff_column diff --git a/src/subshell.c b/src/subshell.c index a47dbf3bb..29a1e8be0 100644 --- a/src/subshell.c +++ b/src/subshell.c @@ -650,16 +650,18 @@ exit_subshell (void) _(" The shell is still active. Quit anyway? "), 0, 2, _("&Yes"), _("&No")); - if (quit && subshell_type == TCSH) { - if (unlink (tcsh_fifo) == -1) - fprintf (stderr, "Cannot remove named pipe %s: %s\r\n", - tcsh_fifo, unix_error_string (errno)); - } + if (quit) { + if (subshell_type == TCSH) { + if (unlink (tcsh_fifo) == -1) + fprintf (stderr, "Cannot remove named pipe %s: %s\r\n", + tcsh_fifo, unix_error_string (errno)); + } - g_free (subshell_prompt); - g_free (pty_buffer); - subshell_prompt = NULL; - pty_buffer = NULL; + g_free (subshell_prompt); + g_free (pty_buffer); + subshell_prompt = NULL; + pty_buffer = NULL; + } return quit; }