From a98f16179037d21357c817701c5181ac37fec0a2 Mon Sep 17 00:00:00 2001 From: Karoly Lorentey Date: Sat, 20 May 2006 12:20:41 +0000 Subject: Fix crashes in `delete-terminal' caused by recursive calls or X displays with live frames. * src/termhooks.h (terminal) : New member. * src/term.c (delete_tty): Use it. (deleting_tty): Remove old variable. * src/terminal.c (delete_terminal): Use terminal->deleted. * src/xterm.c (x_delete_terminal): Use terminal->deleted. Delete all frames on the display explicitly. git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-562 --- src/termhooks.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/termhooks.h') diff --git a/src/termhooks.h b/src/termhooks.h index 8937a709f85..46fb0c453f5 100644 --- a/src/termhooks.h +++ b/src/termhooks.h @@ -299,7 +299,11 @@ struct terminal /* The number of frames that are on this terminal. */ int reference_count; - + + /* Nonzero while deleting this terminal. Used to protect against + recursive calls to delete_terminal_hook. */ + int deleted; + /* The type of the terminal device. */ enum output_method type; -- cgit v1.2.1