logo

oasis

Own branch of Oasis Linux (upstream: <https://git.sr.ht/~mcf/oasis/>) git clone https://anongit.hacktivis.me/git/oasis.git
commit: 5a498ee493837443b61eef73009cdd84b1d0cc70
parent b8450d1d4cc65064a053328ca3e5939d44895c09
Author: Michael Forney <mforney@mforney.org>
Date:   Sat, 22 Feb 2020 17:36:57 -0800

st: Send SIGHUP only when in PTY mode

Diffstat:

Apkg/st/patch/0002-Only-send-SIGHUP-on-close-when-using-PTY.patch31+++++++++++++++++++++++++++++++
Mpkg/st/ver2+-
2 files changed, 32 insertions(+), 1 deletion(-)

diff --git a/pkg/st/patch/0002-Only-send-SIGHUP-on-close-when-using-PTY.patch b/pkg/st/patch/0002-Only-send-SIGHUP-on-close-when-using-PTY.patch @@ -0,0 +1,31 @@ +From f33156065dd67520085f307ec90258e62a537571 Mon Sep 17 00:00:00 2001 +From: Michael Forney <mforney@mforney.org> +Date: Sat, 22 Feb 2020 17:17:01 -0800 +Subject: [PATCH] Only send SIGHUP on close when using PTY + +Otherwise, pid is at its default value (0), so SIGHUP gets sent to +the entire process group. +--- + st.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/st.c b/st.c +index 4feb1f9..220b29d 100644 +--- a/st.c ++++ b/st.c +@@ -4324,8 +4324,10 @@ toplevelconfigure(void *data, struct xdg_toplevel *toplevel, int32_t w, int32_t + void + toplevelclose(void *data, struct xdg_toplevel *toplevel) + { +- /* Send SIGHUP to shell */ +- kill(pid, SIGHUP); ++ if (pid) { ++ /* Send SIGHUP to shell */ ++ kill(pid, SIGHUP); ++ } + exit(0); + } + +-- +2.25.1 + diff --git a/pkg/st/ver b/pkg/st/ver @@ -1 +1 @@ -c63a87cd93 r0 +c63a87cd93 r1