[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#427798: xterm: request for exit hook

On Mon, 28 Feb 2011, Cyril Brulebois wrote:

tag 427798 upstream

Hi Thomas,

what's your take on this one?

Vincent Lefevre <vincent@vinc17.org> (06/06/2007):
Package: xterm
Version: 225-1
Severity: wishlist

It would be useful to have the ability to run a script just before
xterm is about to exit. The script should have access to the following
information in some way:
  * the exit status of the subprocess if it has terminated (thus
    causing xterm to exit);
  * the terminal data.

The goal is to be able to keep the xterm window open and/or to be able
to save its data in the following cases:
  * when the subprocess has crashed (but not if it has terminated

The -hold option does keep the window open.  There's nothing implemented
to "save its data", though that could be done in principal by reusing the
logic for printing the screen, e.g., to save the scrollback as a file.

The comment about "exit hook" is a little odd - xterm would either be
configured using an option or resource to do this feature, but wouldn't
have a good way to tell if the "subprocess has crashed".

  * when the X connection has been lost (it is not possible to keep
    the xterm window open, but it should be possible to save the
    terminal data and do some clean-up if need be).

Here, "some clean-up" is vague (I suppose that's whatever is done in the
hypothetical script to which xterm would transfer the saved data).

Thomas E. Dickey

Reply to: