nixos/config/dwm/dwm.c.rej

30 lines
482 B
Plaintext
Raw Normal View History

2023-07-20 18:37:10 +04:00
--- dwm.c
+++ dwm.c
2023-07-20 19:17:47 +04:00
@@ -1671,9 +1710,25 @@ showhide(Client *c)
2023-07-20 19:12:36 +04:00
void
2023-07-20 19:17:47 +04:00
sigchld(int unused)
2023-07-20 19:12:36 +04:00
{
2023-07-20 19:17:47 +04:00
+ pid_t pid;
2023-07-20 19:12:36 +04:00
+
2023-07-20 19:17:47 +04:00
if (signal(SIGCHLD, sigchld) == SIG_ERR)
die("can't install SIGCHLD handler:");
- while (0 < waitpid(-1, NULL, WNOHANG));
+ while (0 < (pid = waitpid(-1, NULL, WNOHANG))) {
+ pid_t *p, *lim;
2023-07-20 19:12:36 +04:00
+
2023-07-20 19:17:47 +04:00
+ if (!(p = autostart_pids))
+ continue;
+ lim = &p[autostart_len];
2023-07-20 18:37:10 +04:00
+
2023-07-20 19:17:47 +04:00
+ for (; p < lim; p++) {
+ if (*p == pid) {
+ *p = -1;
+ break;
+ }
2023-07-20 19:12:36 +04:00
+ }
+
+ }
}
void