Hello, ports@!
This diff fixes crash x11/sakura port with vte 0.54.
upstream commit:
https://bazaar.launchpad.net/~dabisu/sakura/sakura/revision/596
ok?
? Sakura.diff
? patches
Index: Makefile
===================================================================
RCS file: /cvs/ports/x11/sakura/Makefile,v
retrieving revision 1.24
diff -u -p -u -p -r1.24 Makefile
--- Makefile 27 Jun 2018 21:04:22 -0000 1.24
+++ Makefile 2 Oct 2018 21:56:06 -0000
@@ -5,7 +5,7 @@ COMMENT = GTK and VTE based terminal emu
DISTNAME = sakura-${V}
EXTRACT_SUFX = .tar.bz2
CATEGORIES = x11
-REVISION = 1
+REVISION = 2
HOMEPAGE = http://www.pleyades.net/david/projects/sakura/
MAINTAINER = Victor Kukshiev <[email protected]>
$OpenBSD$
fixed crash with vte 0.54
https://bazaar.launchpad.net/~dabisu/sakura/sakura/revision/596
=== modified file 'src/sakura.c'
--- src/sakura.c 2018-05-02 19:22:43 +0000
+++ src/sakura.c 2018-09-27 14:21:28 +0000
@@ -339,6 +339,7 @@
bool label_set_byuser;
GtkBorder padding; /* inner-property data */
int colorset;
+ gulong exit_handler_id;
};
@@ -984,31 +985,6 @@
if (npages==1) {
sakura_config_done();
}
-
- /* Workaround for libvte strange behaviour. There is not child-exited signal for
- the last terminal, so we need to kill it here. Check with libvte authors about
- child-exited/eof signals */
- if (gtk_notebook_get_current_page(GTK_NOTEBOOK(sakura.notebook))==0) {
-
- term = sakura_get_page_term(sakura, 0);
-
- if (option_hold==TRUE) {
- SAY("hold option has been activated");
- return;
- }
-
- //SAY("waiting for terminal pid (in eof) %d", term->pid);
- //waitpid(term->pid, &status, WNOHANG);
- /* TODO: check wait return */
- /* Child should be automatically reaped because we don't use G_SPAWN_DO_NOT_REAP_CHILD flag */
- g_spawn_close_pid(term->pid);
-
- sakura_del_tab(0);
-
- npages = gtk_notebook_get_n_pages(GTK_NOTEBOOK(sakura.notebook));
- if (npages==0)
- sakura_destroy();
- }
}
/* This handler is called when window title changes, and is used to change window and notebook pages titles */
@@ -3167,7 +3143,7 @@
g_signal_connect(G_OBJECT(term->vte), "bell", G_CALLBACK(sakura_beep), NULL);
g_signal_connect(G_OBJECT(term->vte), "increase-font-size", G_CALLBACK(sakura_increase_font), NULL);
g_signal_connect(G_OBJECT(term->vte), "decrease-font-size", G_CALLBACK(sakura_decrease_font), NULL);
- g_signal_connect(G_OBJECT(term->vte), "child-exited", G_CALLBACK(sakura_child_exited), NULL);
+ term->exit_handler_id = g_signal_connect(G_OBJECT(term->vte), "child-exited", G_CALLBACK(sakura_child_exited), NULL);
g_signal_connect(G_OBJECT(term->vte), "eof", G_CALLBACK(sakura_eof), NULL);
g_signal_connect(G_OBJECT(term->vte), "window-title-changed", G_CALLBACK(sakura_title_changed), NULL);
g_signal_connect_swapped(G_OBJECT(term->vte), "button-press-event", G_CALLBACK(sakura_button_press), sakura.menu);
@@ -3366,6 +3342,7 @@
}
gtk_widget_hide(term->hbox);
+ g_signal_handler_disconnect (term->vte, term->exit_handler_id);
gtk_notebook_remove_page(GTK_NOTEBOOK(sakura.notebook), page);
/* Find the next page, if it exists, and grab focus */