Introduction
Introduction Statistics Contact Development Disclaimer Help
do not call signal-unsafe function inside sighanlder - dwm - dynamic window man…
git clone git://git.suckless.org/dwm
Log
Files
Refs
README
LICENSE
---
commit 6613d9f9a1a5630bab30bc2b70bdc793977073ee
parent 9bffa845faa181fb3afe05f3dc86ad79c80736be
Author: NRK <[email protected]>
Date: Thu, 14 Jul 2022 07:26:40 +0600
do not call signal-unsafe function inside sighanlder
die() calls vprintf, fputc and exit; none of these are
async-signal-safe, see `man 7 signal-safety`.
Diffstat:
M dwm.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/dwm.c b/dwm.c
@@ -1541,6 +1541,8 @@ setup(void)
Atom utf8string;
/* clean up any zombies immediately */
+ if (signal(SIGCHLD, sigchld) == SIG_ERR)
+ die("can't install SIGCHLD handler:");
sigchld(0);
/* init screen */
@@ -1638,8 +1640,6 @@ showhide(Client *c)
void
sigchld(int unused)
{
- if (signal(SIGCHLD, sigchld) == SIG_ERR)
- die("can't install SIGCHLD handler:");
while (0 < waitpid(-1, NULL, WNOHANG));
}
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.