Introduction
Introduction Statistics Contact Development Disclaimer Help
replace exit(3) by _exit(2) in signal handler sigchld() - st - simple terminal
git clone git://git.suckless.org/st
Log
Files
Refs
README
LICENSE
---
commit d6ea0a1a61853dd892029a7126e7fdb70c371878
parent 43a395ae91f7d67ce694e65edeaa7bbc720dd027
Author: Jan Klemkow <[email protected]>
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:
M st.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
You are viewing proxied material from suckless.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.