Commit cb5bbefe authored by Nalin Dahyabhai's avatar Nalin Dahyabhai

properly send a SIGHUP to the child process if it hasn't already exited

* src/vte.c(vte_terminal_finalize): properly send a SIGHUP to the child process
	if it hasn't already exited (#112505).
* src/vteapp.c: don't exit on EOF, only on child-exited.
* src/vte.c(vte_sequence_handler_sf): increment the scrolling offset to avoid
	flickering when the application has defined a scrolling region with top
	row == 1.
parent f123debe
2003-05-20 nalin
* src/vte.c(vte_terminal_finalize): properly send a SIGHUP to the child
process if it hasn't already exited (#112505).
* src/vteapp.c: don't exit on EOF, only on child-exited.
* src/vte.c(vte_sequence_handler_sf): increment the scrolling offset
to avoid flickering when the application has defined a scrolling region
with top row == 1.
2003-05-19 nalin
* src/iso2022.c, src/keymap.c, src/mev.c, src/vtebg.h, src/vteglyph.h:
remove comma from end of enum declaration (#111925).
......
......@@ -216,7 +216,7 @@ AC_DEFINE_UNQUOTED(PACKAGE,"$PACKAGE",[Package name.])
AC_CHECK_HEADERS(sys/select.h sys/un.h stropts.h termios.h wchar.h)
# Check for PTY handling functions.
AC_CHECK_FUNCS(cfmakeraw getpt grantpt unlockpt ptsname ptsname_r recvmsg)
AC_CHECK_FUNCS(cfmakeraw getpgid getpt grantpt unlockpt ptsname ptsname_r recvmsg)
# Pull in the right libraries for various functions which might not be
# bundled into an exploded libc.
......
......@@ -3331,6 +3331,7 @@ vte_sequence_handler_sf(VteTerminal *terminal,
* line and scrolling the area up. */
row = vte_new_row_data_sized(terminal, TRUE);
screen->insert_delta++;
screen->scroll_delta++;
screen->cursor_current.row++;
_vte_ring_insert_preserve(terminal->pvt->screen->row_data,
screen->cursor_current.row,
......@@ -3344,8 +3345,8 @@ vte_sequence_handler_sf(VteTerminal *terminal,
top = screen->cursor_current.row;
bottom = screen->insert_delta +
terminal->row_count - 1;
vte_terminal_scroll_region(terminal, top,
bottom - top + 1, 1);
vte_terminal_scroll_region(terminal, start,
end - start + 1, 1);
/* Force scroll. */
vte_terminal_ensure_cursor(terminal, FALSE);
vte_terminal_adjust_adjustments(terminal, TRUE);
......@@ -11196,7 +11197,14 @@ vte_terminal_finalize(GObject *object)
/* Stop the child and stop watching for input from the child. */
if (terminal->pvt->pty_pid != -1) {
kill(-terminal->pvt->pty_pid, SIGHUP);
#ifdef HAVE_GETPGID
pid_t pgrp;
pgrp = getpgid(terminal->pvt->pty_pid);
if (pgrp != -1) {
kill(-pgrp, SIGHUP);
}
#endif
kill(terminal->pvt->pty_pid, SIGHUP);
}
terminal->pvt->pty_pid = -1;
_vte_terminal_disconnect_pty_read(terminal);
......
......@@ -86,6 +86,13 @@ char_size_changed(GtkWidget *widget, guint width, guint height, gpointer data)
GDK_HINT_MIN_SIZE);
}
static void
deleted_and_quit(GtkWidget *widget, GdkEvent *event, gpointer data)
{
gtk_widget_destroy(GTK_WIDGET(data));
gtk_main_quit();
}
static void
destroy_and_quit(GtkWidget *widget, gpointer data)
{
......@@ -489,7 +496,7 @@ main(int argc, char **argv)
* delete event to the quit function.. */
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
g_signal_connect(G_OBJECT(window), "delete_event",
GTK_SIGNAL_FUNC(gtk_main_quit), NULL);
GTK_SIGNAL_FUNC(deleted_and_quit), window);
/* Create a box to hold everything. */
hbox = gtk_hbox_new(0, FALSE);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment