Backport upstream patch to fix zombie shells (GNOME #740929)
This commit is contained in:
parent
54d3476852
commit
73a2eab3a0
@ -0,0 +1,48 @@
|
||||
From eaaffc7508765ceb54e648e6fd2f31bc9969846b Mon Sep 17 00:00:00 2001
|
||||
From: Egmont Koblinger <egmont@gmail.com>
|
||||
Date: Mon, 1 Dec 2014 13:30:52 +0100
|
||||
Subject: [PATCH] widget: Do not leave behind a zombie child when closing a
|
||||
terminal
|
||||
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=740929
|
||||
---
|
||||
src/vte.c | 12 +++++++++++-
|
||||
1 file changed, 11 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/vte.c b/src/vte.c
|
||||
index c6172fc..e5149c9 100644
|
||||
--- a/src/vte.c
|
||||
+++ b/src/vte.c
|
||||
@@ -3210,6 +3210,12 @@ vte_terminal_child_watch_cb(GPid pid,
|
||||
int status,
|
||||
VteTerminal *terminal)
|
||||
{
|
||||
+ if (terminal == NULL) {
|
||||
+ /* The child outlived VteTerminal. Do nothing, we're happy that Glib
|
||||
+ * read its exit data and hence it's no longer there as zombie. */
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
if (pid == terminal->pvt->pty_pid) {
|
||||
GObject *object = G_OBJECT(terminal);
|
||||
|
||||
@@ -8416,11 +8422,15 @@ vte_terminal_finalize(GObject *object)
|
||||
terminal->pvt->outgoing_conv = VTE_INVALID_CONV;
|
||||
}
|
||||
|
||||
- /* Stop listening for child-exited signals. */
|
||||
+ /* Start listening for child-exited signals and ignore them, so that no zombie child is left behind. */
|
||||
if (terminal->pvt->child_watch_source != 0) {
|
||||
g_source_remove (terminal->pvt->child_watch_source);
|
||||
terminal->pvt->child_watch_source = 0;
|
||||
}
|
||||
+ g_child_watch_add_full(G_PRIORITY_HIGH,
|
||||
+ terminal->pvt->pty_pid,
|
||||
+ (GChildWatchFunc)vte_terminal_child_watch_cb,
|
||||
+ NULL, NULL);
|
||||
|
||||
/* Stop processing input. */
|
||||
vte_terminal_stop_processing (terminal);
|
||||
--
|
||||
2.1.0
|
||||
|
||||
12
vte291.spec
12
vte291.spec
@ -2,14 +2,16 @@
|
||||
|
||||
Name: vte291
|
||||
Version: 0.39.0
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: Terminal emulator library
|
||||
|
||||
License: LGPLv2+
|
||||
URL: http://www.gnome.org/
|
||||
Source0: http://download.gnome.org/sources/vte/0.39/vte-%{version}.tar.xz
|
||||
# https://bugzilla.gnome.org/show_bug.cgi?id=688456
|
||||
Patch2: 0001-widget-Only-show-the-cursor-on-motion-if-moved.patch
|
||||
Patch0: 0001-widget-Only-show-the-cursor-on-motion-if-moved.patch
|
||||
# https://bugzilla.gnome.org/show_bug.cgi?id=740929
|
||||
Patch1: 0001-widget-Do-not-leave-behind-a-zombie-child-when-closi.patch
|
||||
|
||||
BuildRequires: gettext
|
||||
BuildRequires: gobject-introspection-devel
|
||||
@ -50,7 +52,8 @@ emulator library.
|
||||
|
||||
%prep
|
||||
%setup -q -n vte-%{version}
|
||||
%patch2 -p1 -b .motion
|
||||
%patch0 -p1 -b .motion
|
||||
%patch1 -p1 -b .zombie
|
||||
|
||||
%build
|
||||
CFLAGS="%optflags -fPIE -DPIE" \
|
||||
@ -96,6 +99,9 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/*.la
|
||||
%{_sysconfdir}/profile.d/vte.sh
|
||||
|
||||
%changelog
|
||||
* Mon Dec 01 2014 Debarshi Ray <rishi@fedoraproject.org> - 0.39.0-2
|
||||
- Backport upstream patch to fix zombie shells (GNOME #740929)
|
||||
|
||||
* Tue Nov 25 2014 Kalev Lember <kalevlember@gmail.com> - 0.39.0-1
|
||||
- Update to 0.39.0
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user