st

simple terminal

git clone https://9o.is/git/st.git

commit f15b5254a0db34dab7bdc0cb1866a9fe66cc87fe
parent 4b0637909c3f57135dbf22411e5a0cbeabaeb969
Author: Jan Klemkow <j.klemkow@wemelug.de>
Date:   Thu, 30 Apr 2020 00:10:02 +0200

replace exit(3) by _exit(2) in signal handler sigchld()

exit(3) is not async-signal-safe but, _exit(2) is.
This change prevents st to crash and dump core.

Diffstat:
Mst.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/st.c b/st.c @@ -730,7 +730,7 @@ sigchld(int a) die("child exited with status %d\n", WEXITSTATUS(stat)); else if (WIFSIGNALED(stat)) die("child terminated due to signal %d\n", WTERMSIG(stat)); - exit(0); + _exit(0); } void