Re: [dev] [st] Understading st behaviour

From: Balazs Kezes <>
Date: Tue, 15 Apr 2014 19:19:24 +0100

On 2014-04-15 18:44 +0200, Markus Wichmann wrote:
> st reacted to the DELETE_WINDOW message by killing the shell with
> SIGHUP. Now, your shell may ignore SIGHUP, since it is waiting for
> mutt to finish. Or it may die. If it died and sent mutt the SIGHUP,
> too, that would be great, however, some shells don't send SIGHUP on
> exit by default, and some users don't want that.

Shouldn't you be sending the SIGHUP to the shell's process group instead
of just to shell? E.g.

         } else if(e->[0] == xw.wmdeletewin) {
                 /* Send SIGHUP to shell */
- kill(pid, SIGHUP);
+ kill(-pid, SIGHUP);

xterm does this[1]. SIGWINCH should be sent the same way but I'm not
sure how is st handling that (I'm not using it, I'm just a lurker).

[1] Search for kill_process_group(screen->pid, SIGHUP) in

Received on Tue Apr 15 2014 - 20:19:24 CEST

This archive was generated by hypermail 2.3.0 : Tue Apr 15 2014 - 20:24:06 CEST