mirror of
https://github.com/swaywm/sway.git
synced 2024-11-17 05:33:17 +00:00
Revert "#187 cleanup zombies properly"
This commit is contained in:
parent
05c86f7f99
commit
5bcecbb751
11
sway/main.c
11
sway/main.c
|
@ -22,6 +22,8 @@ void sway_terminate(void) {
|
||||||
wlc_terminate();
|
wlc_terminate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void sigchld_handle(int signal);
|
||||||
|
|
||||||
static void wlc_log_handler(enum wlc_log_type type, const char *str) {
|
static void wlc_log_handler(enum wlc_log_type type, const char *str) {
|
||||||
if (type == WLC_LOG_ERROR) {
|
if (type == WLC_LOG_ERROR) {
|
||||||
sway_log(L_ERROR, "[wlc] %s", str);
|
sway_log(L_ERROR, "[wlc] %s", str);
|
||||||
|
@ -62,8 +64,8 @@ int main(int argc, char **argv) {
|
||||||
{0, 0, 0, 0}
|
{0, 0, 0, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
/* clean zombie processes */
|
/* Signal handling */
|
||||||
signal(SIGCHLD, SIG_IGN);
|
signal(SIGCHLD, sigchld_handle);
|
||||||
|
|
||||||
setenv("WLC_DIM", "0", 0);
|
setenv("WLC_DIM", "0", 0);
|
||||||
|
|
||||||
|
@ -150,3 +152,8 @@ int main(int argc, char **argv) {
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void sigchld_handle(int signal) {
|
||||||
|
(void) signal;
|
||||||
|
while (waitpid((pid_t)-1, 0, WNOHANG) > 0);
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue