- Destroy terminal on detach (may help with bug 490965)

This commit is contained in:
Ray Strode 2009-03-18 18:18:20 +00:00
parent f6df367388
commit d109aed041
2 changed files with 42 additions and 1 deletions

View File

@ -0,0 +1,35 @@
diff --git a/src/libply/ply-terminal-session.c b/src/libply/ply-terminal-session.c
index 82e0c00..2a4ca8d 100644
--- a/src/libply/ply-terminal-session.c
+++ b/src/libply/ply-terminal-session.c
@@ -56,6 +56,7 @@ struct _ply_terminal_session
uint32_t is_running : 1;
uint32_t console_is_redirected : 1;
+ uint32_t created_terminal_device : 1;
};
static bool ply_terminal_session_open_console (ply_terminal_session_t *session);
@@ -325,6 +326,8 @@ ply_terminal_session_attach (ply_terminal_session_t *session,
ply_trace ("could not create pseudo-terminal: %m");
return false;
}
+
+ session->created_terminal_device = true;
}
if (should_redirect_console)
@@ -364,6 +367,13 @@ ply_terminal_session_detach (ply_terminal_session_t *session)
ply_terminal_session_unredirect_console (session);
}
+ if (session->created_terminal_device)
+ {
+ ply_trace ("ptmx wasn't originally passed in, destroying created one");
+ ply_terminal_destroy_device (session->terminal);
+ session->created_terminal_device = false;
+ }
+
session->output_handler = NULL;
session->done_handler = NULL;
session->user_data = NULL;

View File

@ -5,7 +5,7 @@
Summary: Graphical Boot Animation and Logger Summary: Graphical Boot Animation and Logger
Name: plymouth Name: plymouth
Version: 0.7.0 Version: 0.7.0
Release: 0.2009.03.10.1%{?dist} Release: 0.2009.03.10.2%{?dist}
License: GPLv2+ License: GPLv2+
Group: System Environment/Base Group: System Environment/Base
Source0: http://freedesktop.org/software/plymouth/releases/%{name}-%{version}.tar.bz2 Source0: http://freedesktop.org/software/plymouth/releases/%{name}-%{version}.tar.bz2
@ -18,6 +18,8 @@ Requires: system-logos >= 9.0.1
Requires(post): plymouth-scripts Requires(post): plymouth-scripts
Requires: initscripts >= 8.83-1 Requires: initscripts >= 8.83-1
Patch0: plymouth-0.7.0-destroy-terminal-on-detach.patch
Obsoletes: plymouth-text-and-details-only < %{version}-%{release} Obsoletes: plymouth-text-and-details-only < %{version}-%{release}
%description %description
@ -149,6 +151,7 @@ Plymouth. It features a blue flamed sun with animated solar flares.
%prep %prep
%setup -q %setup -q
%patch0 -p1 -b .destroy-terminal-on-detach
%build %build
%configure --enable-tracing --disable-tests --without-boot-entry \ %configure --enable-tracing --disable-tests --without-boot-entry \
@ -319,6 +322,9 @@ fi
%defattr(-, root, root) %defattr(-, root, root)
%changelog %changelog
* Wed Mar 18 2009 Ray Strode <rstrode@redhat.com> 0.7.0-0.2009.03.10.2
- Destroy terminal on detach (may help with bug 490965)
* Tue Mar 10 2009 Ray Strode <rstrode@redhat.com> 0.7.0-0.2009.03.10.1 * Tue Mar 10 2009 Ray Strode <rstrode@redhat.com> 0.7.0-0.2009.03.10.1
- Address one more issue with password handling. It wasn't working - Address one more issue with password handling. It wasn't working
well for secondary devices when using the "details" plugin. well for secondary devices when using the "details" plugin.