linux-qubasis
linux oasis port as a qubes template
git clone https://9o.is/git/linux-qubasis.git
0002-Only-send-SIGHUP-on-close-when-using-PTY.patch
(769B)
1 From 6ee6144c159551d45f0e02a87b5635c29e48fbbf Mon Sep 17 00:00:00 2001
2 From: Michael Forney <mforney@mforney.org>
3 Date: Sat, 22 Feb 2020 17:17:01 -0800
4 Subject: [PATCH] Only send SIGHUP on close when using PTY
5
6 Otherwise, pid is at its default value (0), so SIGHUP gets sent to
7 the entire process group.
8 ---
9 st.c | 6 ++++--
10 1 file changed, 4 insertions(+), 2 deletions(-)
11
12 diff --git a/st.c b/st.c
13 index 913c71b..20a3c3c 100644
14 --- a/st.c
15 +++ b/st.c
16 @@ -4325,8 +4325,10 @@ toplevelconfigure(void *data, struct xdg_toplevel *toplevel, int32_t w, int32_t
17 void
18 toplevelclose(void *data, struct xdg_toplevel *toplevel)
19 {
20 - /* Send SIGHUP to shell */
21 - kill(pid, SIGHUP);
22 + if (pid) {
23 + /* Send SIGHUP to shell */
24 + kill(pid, SIGHUP);
25 + }
26 exit(0);
27 }
28
29 --
30 2.37.3
31