diff options
| author | Hiltjo Posthuma <hiltjo@codemadness.org> | 2022-07-22 09:18:52 +0200 |
|---|---|---|
| committer | Hiltjo Posthuma <hiltjo@codemadness.org> | 2022-07-22 09:18:52 +0200 |
| commit | e03248a4d5feaaacb130416be6e467a04de81f78 (patch) | |
| tree | 3a6ac9174b9ac4d76813fcd1c086d4381abaf5ae /dwm.c | |
| parent | do not call signal-unsafe function inside sighanlder (diff) | |
| download | dwm-e03248a4d5feaaacb130416be6e467a04de81f78.tar.gz dwm-e03248a4d5feaaacb130416be6e467a04de81f78.zip | |
Revert "do not call signal-unsafe function inside sighanlder"
This reverts commit 6613d9f9a1a5630bab30bc2b70bdc793977073ee.
Discussed on the mailinglist:
https://lists.suckless.org/hackers/2207/18405.html
Diffstat (limited to 'dwm.c')
| -rw-r--r-- | dwm.c | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -1541,8 +1541,6 @@ setup(void) | |||
| 1541 | Atom utf8string; | 1541 | Atom utf8string; |
| 1542 | 1542 | ||
| 1543 | /* clean up any zombies immediately */ | 1543 | /* clean up any zombies immediately */ |
| 1544 | if (signal(SIGCHLD, sigchld) == SIG_ERR) | ||
| 1545 | die("can't install SIGCHLD handler:"); | ||
| 1546 | sigchld(0); | 1544 | sigchld(0); |
| 1547 | 1545 | ||
| 1548 | /* init screen */ | 1546 | /* init screen */ |
| @@ -1640,6 +1638,8 @@ showhide(Client *c) | |||
| 1640 | void | 1638 | void |
| 1641 | sigchld(int unused) | 1639 | sigchld(int unused) |
| 1642 | { | 1640 | { |
| 1641 | if (signal(SIGCHLD, sigchld) == SIG_ERR) | ||
| 1642 | die("can't install SIGCHLD handler:"); | ||
| 1643 | while (0 < waitpid(-1, NULL, WNOHANG)); | 1643 | while (0 < waitpid(-1, NULL, WNOHANG)); |
| 1644 | } | 1644 | } |
| 1645 | 1645 | ||
