[vte] Der Tod und das Datensichtgerät
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte] Der Tod und das Datensichtgerät
- Date: Mon, 24 Mar 2014 21:08:44 +0000 (UTC)
commit de112fd8039ab6244e2cf53dbacdfc4a49504c48
Author: Christian Persch <chpe gnome org>
Date: Mon May 2 20:47:11 2011 +0200
Der Tod und das Datensichtgerät
https://bugzilla.gnome.org/show_bug.cgi?id=112172
Conflicts:
src/reaper.c
src/reaper.h
doc/reference/vte-docs.xml | 4 -
doc/reference/vte-sections.txt | 17 ---
doc/reference/vte.types | 2 -
src/Makefile.am | 11 +--
src/reaper.c | 226 ----------------------------------------
src/reaper.h | 75 -------------
src/vte-private.h | 3 +-
src/vte.c | 52 +++------
8 files changed, 21 insertions(+), 369 deletions(-)
---
diff --git a/doc/reference/vte-docs.xml b/doc/reference/vte-docs.xml
index 702bfbd..66a68d9 100644
--- a/doc/reference/vte-docs.xml
+++ b/doc/reference/vte-docs.xml
@@ -66,10 +66,6 @@
<title>Interna</title>
<xi:include href="xml/vte-access.xml"/>
</chapter>
- <chapter id="deprecated-objects">
- <title>Deprecated</title>
- <xi:include href="xml/vte-reaper.xml"/>
- </chapter>
</part>
<chapter id="object-hierarchy">
diff --git a/doc/reference/vte-sections.txt b/doc/reference/vte-sections.txt
index 779c4ba..c67a069 100644
--- a/doc/reference/vte-sections.txt
+++ b/doc/reference/vte-sections.txt
@@ -227,20 +227,3 @@ VteTerminalAccessibleFactory
VteTerminalAccessibleFactoryClass
vte_terminal_accessible_factory_new
</SECTION>
-
-<SECTION>
-<FILE>vte-reaper</FILE>
-<TITLE>VteReaper</TITLE>
-VteReaper
-vte_reaper_add_child
-vte_reaper_get
-
-<SUBSECTION Standard>
-VTE_IS_REAPER
-VTE_IS_REAPER_CLASS
-VTE_REAPER
-VTE_REAPER_CLASS
-VTE_REAPER_GET_CLASS
-VTE_TYPE_REAPER
-vte_reaper_get_type
-</SECTION>
diff --git a/doc/reference/vte.types b/doc/reference/vte.types
index 83b1aec..188643b 100644
--- a/doc/reference/vte.types
+++ b/doc/reference/vte.types
@@ -7,10 +7,8 @@
#include "vteaccess.h"
#include "vtepty.h"
#include "vtetypebuiltins.h"
-#include "reaper.h"
vte_pty_get_type
-vte_reaper_get_type
vte_terminal_get_type
vte_terminal_accessible_get_type
vte_terminal_accessible_factory_get_type
diff --git a/src/Makefile.am b/src/Makefile.am
index ad9f1ef..b779cc5 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -5,7 +5,7 @@ EXTRA_DIST = iso2022.txt
# The library
headerdir = $(includedir)/vte-$(VTE_API_VERSION)/vte
-header_HEADERS = reaper.h vte.h vteaccess.h vtepty.h vtetypebuiltins.h vteversion.h vtedeprecated.h
+header_HEADERS = vte.h vteaccess.h vtepty.h vtetypebuiltins.h vteversion.h vtedeprecated.h
lib_LTLIBRARIES = libvte- VTE_API_MAJOR_VERSION@ VTE_API_MINOR_VERSION@.la
@@ -44,8 +44,6 @@ libvte_ VTE_API_MAJOR_VERSION@_ VTE_API_MINOR_VERSION@_la_SOURCES = \
matcher.c \
matcher.h \
pty.c \
- reaper.c \
- reaper.h \
ring.c \
ring.h \
table.c \
@@ -105,7 +103,7 @@ libvte_ VTE_API_MAJOR_VERSION@_ VTE_API_MINOR_VERSION@_la_LIBADD = $(VTE_LIBS)
libvte_ VTE_API_MAJOR_VERSION@_ VTE_API_MINOR_VERSION@_la_LDFLAGS = \
$(VTE_LDFLAGS) \
-version-info $(LT_VERSION_INFO) \
- -export-symbols-regex "^vte_terminal_.*|^vte_pty_.*|^vte_get_.*|^vte_reaper_.*|_vte_debug_.*" \
+ -export-symbols-regex "^vte_terminal_.*|^vte_pty_.*|^vte_get_.*|_vte_debug_.*" \
@LIBTOOL_EXPORT_OPTIONS@ @LIBTOOL_FLAGS@ \
$(AM_LDFLAGS)
@@ -223,7 +221,7 @@ TEST_SH = \
$(NULL)
EXTRA_DIST += $(TEST_SH)
-check_PROGRAMS = dumpkeys iso2022 reaper reflect-text-view reflect-vte mev ssfe table trie xticker vteconv
vtetc
+check_PROGRAMS = dumpkeys iso2022 reflect-text-view reflect-vte mev ssfe table trie xticker vteconv vtetc
TESTS = table trie $(TEST_SH)
AM_CFLAGS = $(GLIB_CFLAGS)
@@ -338,9 +336,6 @@ trie_LDADD = $(VTE_LIBS)
vtetc_SOURCES = vtetc.c vtetc.h debug.c debug.h
vtetc_CPPFLAGS = -DTERMCAP_MAIN
-reaper_SOURCES = reaper.c reaper.h debug.c debug.h marshal.c marshal.h
-reaper_CPPFLAGS = -DREAPER_MAIN -DLOCALEDIR='"$(localedir)"'
-
vteconv_SOURCES = buffer.h debug.c debug.h vteconv.c vteconv.h
vteconv_CPPFLAGS = -DVTECONV_MAIN
vteconv_CFLAGS = $(VTE_CFLAGS)
diff --git a/src/vte-private.h b/src/vte-private.h
index 2e68c0d..be5c219 100644
--- a/src/vte-private.h
+++ b/src/vte-private.h
@@ -46,7 +46,6 @@
#include "debug.h"
#include "vteconv.h"
#include "vtedraw.h"
-#include "reaper.h"
#include "ring.h"
#include "caps.h"
@@ -200,7 +199,7 @@ struct _VteTerminalPrivate {
guint pty_output_source;
gboolean pty_input_active;
GPid pty_pid; /* pid of child using pty slave */
- VteReaper *pty_reaper;
+ guint child_watch_source;
int child_exit_status;
/* Input data queues. */
diff --git a/src/vte.c b/src/vte.c
index 2cc1597..cb798ea 100644
--- a/src/vte.c
+++ b/src/vte.c
@@ -3215,11 +3215,10 @@ not_inserted:
return line_wrapped;
}
-/* Catch a VteReaper child-exited signal, and if it matches the one we're
- * looking for, emit one of our own. */
static void
-vte_terminal_catch_child_exited(VteReaper *reaper, int pid, int status,
- VteTerminal *terminal)
+vte_terminal_child_watch_cb(GPid pid,
+ int status,
+ VteTerminal *terminal)
{
if (pid == terminal->pvt->pty_pid) {
GObject *object = G_OBJECT(terminal);
@@ -3240,14 +3239,8 @@ vte_terminal_catch_child_exited(VteReaper *reaper, int pid, int status,
}
#endif
}
- /* Disconnect from the reaper. */
- if (terminal->pvt->pty_reaper != NULL) {
- g_signal_handlers_disconnect_by_func(terminal->pvt->pty_reaper,
- vte_terminal_catch_child_exited,
- terminal);
- g_object_unref(terminal->pvt->pty_reaper);
- terminal->pvt->pty_reaper = NULL;
- }
+
+ terminal->pvt->child_watch_source = 0;
terminal->pvt->pty_pid = -1;
/* Close out the PTY. */
@@ -3402,7 +3395,6 @@ vte_terminal_watch_child (VteTerminal *terminal,
{
VteTerminalPrivate *pvt;
GObject *object;
- VteReaper *reaper;
g_return_if_fail(VTE_IS_TERMINAL(terminal));
g_return_if_fail(child_pid != -1);
@@ -3421,22 +3413,14 @@ vte_terminal_watch_child (VteTerminal *terminal,
pvt->child_exit_status = 0;
/* Catch a child-exited signal from the child pid. */
- reaper = vte_reaper_get();
- vte_reaper_add_child(child_pid);
- if (reaper != pvt->pty_reaper) {
- if (terminal->pvt->pty_reaper != NULL) {
- g_signal_handlers_disconnect_by_func(pvt->pty_reaper,
- vte_terminal_catch_child_exited,
- terminal);
- g_object_unref(pvt->pty_reaper);
- }
- g_signal_connect(reaper, "child-exited",
- G_CALLBACK(vte_terminal_catch_child_exited),
- terminal);
- pvt->pty_reaper = reaper;
- } else {
- g_object_unref(reaper);
- }
+ if (terminal->pvt->child_watch_source != 0) {
+ g_source_remove (terminal->pvt->child_watch_source);
+ }
+ terminal->pvt->child_watch_source =
+ g_child_watch_add_full(G_PRIORITY_HIGH,
+ child_pid,
+ (GChildWatchFunc)vte_terminal_child_watch_cb,
+ terminal, NULL);
/* FIXMEchpe: call vte_terminal_set_size here? */
@@ -8852,12 +8836,10 @@ vte_terminal_finalize(GObject *object)
}
/* Stop listening for child-exited signals. */
- if (terminal->pvt->pty_reaper != NULL) {
- g_signal_handlers_disconnect_by_func(terminal->pvt->pty_reaper,
- vte_terminal_catch_child_exited,
- terminal);
- g_object_unref(terminal->pvt->pty_reaper);
- }
+ if (terminal->pvt->child_watch_source != 0) {
+ g_source_remove (terminal->pvt->child_watch_source);
+ terminal->pvt->child_watch_source = 0;
+ }
/* Stop processing input. */
vte_terminal_stop_processing (terminal);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]