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 | bump version to 0.8.3 (diff) | |
| download | st-d6ea0a1a61853dd892029a7126e7fdb70c371878.tar.gz 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 '')
| -rw-r--r-- | st.c | 2 |
1 files changed, 1 insertions, 1 deletions
| @@ -730,7 +730,7 @@ sigchld(int a) | |||
| 730 | die("child exited with status %d\n", WEXITSTATUS(stat)); | 730 | die("child exited with status %d\n", WEXITSTATUS(stat)); |
| 731 | else if (WIFSIGNALED(stat)) | 731 | else if (WIFSIGNALED(stat)) |
| 732 | die("child terminated due to signal %d\n", WTERMSIG(stat)); | 732 | die("child terminated due to signal %d\n", WTERMSIG(stat)); |
| 733 | exit(0); | 733 | _exit(0); |
| 734 | } | 734 | } |
| 735 | 735 | ||
| 736 | void | 736 | void |
