diff options
author | Drew DeVault <sir@cmpwn.com> | 2015-10-07 19:39:51 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2015-10-07 19:39:51 -0400 |
commit | 05c86f7f9929d10be89ef5e535a363ee951894c8 (patch) | |
tree | 3075a4762e8e2e08d905b1d9c4c2486ede6db1cc | |
parent | 3ca1fa78447ef88f2c438b7f0edbca2e2dde3557 (diff) | |
parent | 5539fd89be99bcec6d5eeb43c6123954ce59038e (diff) |
Merge pull request #188 from taiyu-len/master
#187 cleanup zombies properly
-rw-r--r-- | sway/main.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/sway/main.c b/sway/main.c index 66921184..93dbae8d 100644 --- a/sway/main.c +++ b/sway/main.c @@ -22,8 +22,6 @@ void sway_terminate(void) { wlc_terminate(); } -static void sigchld_handle(int signal); - static void wlc_log_handler(enum wlc_log_type type, const char *str) { if (type == WLC_LOG_ERROR) { sway_log(L_ERROR, "[wlc] %s", str); @@ -64,8 +62,8 @@ int main(int argc, char **argv) { {0, 0, 0, 0} }; - /* Signal handling */ - signal(SIGCHLD, sigchld_handle); + /* clean zombie processes */ + signal(SIGCHLD, SIG_IGN); setenv("WLC_DIM", "0", 0); @@ -152,8 +150,3 @@ int main(int argc, char **argv) { return 0; } - -void sigchld_handle(int signal) { - (void) signal; - while (waitpid((pid_t)-1, 0, WNOHANG) > 0); -} |