diff options
| author | Michael Forney <mforney@mforney.org> | 2020-02-22 17:36:57 -0800 |
|---|---|---|
| committer | Michael Forney <mforney@mforney.org> | 2020-03-01 19:24:52 -0800 |
| commit | 5a498ee493837443b61eef73009cdd84b1d0cc70 (patch) | |
| tree | 0e43316602e9767481ed79d04e93cb765354db5e | |
| parent | b8450d1d4cc65064a053328ca3e5939d44895c09 (diff) | |
st: Send SIGHUP only when in PTY mode
| -rw-r--r-- | pkg/st/patch/0002-Only-send-SIGHUP-on-close-when-using-PTY.patch | 31 | ||||
| -rw-r--r-- | pkg/st/ver | 2 |
2 files changed, 32 insertions, 1 deletions
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 new file mode 100644 index 00000000..50ead2f0 --- /dev/null +++ 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 + @@ -1 +1 @@ -c63a87cd93 r0 +c63a87cd93 r1 |
