Bug#233883: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=233883

Thomas Dickey dickey@his.com (Thomas Dickey), 233883@bugs.debian.org
Fri, 23 Apr 2004 20:47:48 -0400


>                       Debian Bug report logs - #233883
>       gnome-session: very slow to shut down (checkpoint?) xterm windows
...
Since I'm testing with gnome currently, this is noticeably very repeatable.
It's definitely related to the session-management code in xterm.  I can
see that it is really just in this one chunk of code (for xterm):

#if OPT_SESSION_MGT
	toplevel = XtOpenApplication(&app_con, my_class,
				     optionDescList,
				     XtNumber(optionDescList),
				     &argc, argv, fallback_resources,
				     sessionShellWidgetClass,
				     NULL, 0);
#else
	toplevel = XtAppInitialize(&app_con, my_class,
				   optionDescList,
				   XtNumber(optionDescList),
				   &argc, argv, fallback_resources,
				   NULL, 0);
#endif /* OPT_SESSION_MGT */

If the XtOpenApplication is called, xterm will hang, if XtAppInitialize
is called (the older version), it doesn't hang.  Essentially the difference
(according to the manpage) between the two is that the former calls
XtAppCreateShell (so it can handle session management).

A quick fix is to simply add a

	-DOPT_SESSION_MGT=0

when compiling xterm.  That seems to fix the current configuration.  (The
Redhat9 I was looking at before was not quite so insistent about holding
onto the xterm).
-- 
Thomas E. Dickey <dickey@invisible-island.net>
http://invisible-island.net
ftp://invisible-island.net