diff options
author | Jan Klemkow <j.klemkow@wemelug.de> | 2020-04-30 00:10:02 +0200 |
---|---|---|
committer | Hiltjo Posthuma <hiltjo@codemadness.org> | 2020-04-30 01:21:21 +0200 |
commit | d6ea0a1a61853dd892029a7126e7fdb70c371878 (patch) | |
tree | 1f8c2881a9d6271fadd19f1ef36d1d0131f4e9de /st.c | |
parent | 43a395ae91f7d67ce694e65edeaa7bbc720dd027 (diff) | |
download | st-d6ea0a1a61853dd892029a7126e7fdb70c371878.tar.gz st-d6ea0a1a61853dd892029a7126e7fdb70c371878.tar.bz2 st-d6ea0a1a61853dd892029a7126e7fdb70c371878.zip |
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 (limited to 'st.c')
-rw-r--r-- | st.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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 |