mirror of
https://git.suckless.org/dwm
synced 2024-12-27 03:16:32 +00:00
Revert "do not call signal-unsafe function inside sighanlder"
This reverts commit 6613d9f9a1
.
Discussed on the mailinglist:
https://lists.suckless.org/hackers/2207/18405.html
This commit is contained in:
parent
6613d9f9a1
commit
e03248a4d5
1 changed files with 2 additions and 2 deletions
4
dwm.c
4
dwm.c
|
@ -1541,8 +1541,6 @@ setup(void)
|
||||||
Atom utf8string;
|
Atom utf8string;
|
||||||
|
|
||||||
/* clean up any zombies immediately */
|
/* clean up any zombies immediately */
|
||||||
if (signal(SIGCHLD, sigchld) == SIG_ERR)
|
|
||||||
die("can't install SIGCHLD handler:");
|
|
||||||
sigchld(0);
|
sigchld(0);
|
||||||
|
|
||||||
/* init screen */
|
/* init screen */
|
||||||
|
@ -1640,6 +1638,8 @@ showhide(Client *c)
|
||||||
void
|
void
|
||||||
sigchld(int unused)
|
sigchld(int unused)
|
||||||
{
|
{
|
||||||
|
if (signal(SIGCHLD, sigchld) == SIG_ERR)
|
||||||
|
die("can't install SIGCHLD handler:");
|
||||||
while (0 < waitpid(-1, NULL, WNOHANG));
|
while (0 < waitpid(-1, NULL, WNOHANG));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue