John E. Davis | 5 Mar 2009 05:52
Picon
Favicon

Re: signal handler within jed?

On Thu, 5 Mar 2009 01:45:24 +0000 (UTC), Jörg Sommer <joerg <at> alea.gnuu.de>
wrote:
> XTerm sends SIGHUP before it quits. Try it in a shell:
>
> % trap "echo I don't go" HUP
>
> and try to close the window. Jed should take the SIGHUP as request to

Try the same experiment using rxvt or urxvt,  XTerm may wait for the
process it started to finish but those do not.

>> Perhaps the window manager can be configured to not kill xterm when
>> the user presses the "close" button.
>
> My window manager (IceWM) doesn't kill the window. It send a signal to

As far as I can tell, xterm ignores SIGHUP. I suspect that your WM
sends xterm a ClientMessage Xevent.

> XTerm and XTerm sends SIGHUP to process he has started, e.g. the shell.
> This process passes the signal to its child processes, e.g. jed. This way
> jed can block the closing of the window.

I do not believe it is as simple as that.   Try this:

   xterm -e /bin/bash &
   (or just `xterm &`)

In the newly created xterm window, start another instance of bash:

(Continue reading)


Gmane