all repos — st @ d6ea0a1a61853dd892029a7126e7fdb70c371878

st (suckless terminal) config

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.
Jan Klemkow j.klemkow@wemelug.de
commit

d6ea0a1a61853dd892029a7126e7fdb70c371878

parent

43a395ae91f7d67ce694e65edeaa7bbc720dd027

1 files changed, 1 insertions(+), 1 deletions(-)

jump to
M st.cst.c

@@ -730,7 +730,7 @@ if (WIFEXITED(stat) && WEXITSTATUS(stat))

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