aboutsummaryrefslogtreecommitdiffstats
path: root/sway/main.c
diff options
context:
space:
mode:
authorLibravatar taiyu <taiyu.len@gmail.com>2015-10-07 16:18:57 -0700
committerLibravatar taiyu <taiyu.len@gmail.com>2015-10-07 16:18:57 -0700
commit5539fd89be99bcec6d5eeb43c6123954ce59038e (patch)
tree3075a4762e8e2e08d905b1d9c4c2486ede6db1cc /sway/main.c
parentMerge pull request #185 from sleep-walker/master (diff)
downloadsway-5539fd89be99bcec6d5eeb43c6123954ce59038e.tar.gz
sway-5539fd89be99bcec6d5eeb43c6123954ce59038e.tar.zst
sway-5539fd89be99bcec6d5eeb43c6123954ce59038e.zip
#187 cleanup zombies properly using default
Diffstat (limited to 'sway/main.c')
-rw-r--r--sway/main.c11
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) {
22 wlc_terminate(); 22 wlc_terminate();
23} 23}
24 24
25static void sigchld_handle(int signal);
26
27static void wlc_log_handler(enum wlc_log_type type, const char *str) { 25static void wlc_log_handler(enum wlc_log_type type, const char *str) {
28 if (type == WLC_LOG_ERROR) { 26 if (type == WLC_LOG_ERROR) {
29 sway_log(L_ERROR, "[wlc] %s", str); 27 sway_log(L_ERROR, "[wlc] %s", str);
@@ -64,8 +62,8 @@ int main(int argc, char **argv) {
64 {0, 0, 0, 0} 62 {0, 0, 0, 0}
65 }; 63 };
66 64
67 /* Signal handling */ 65 /* clean zombie processes */
68 signal(SIGCHLD, sigchld_handle); 66 signal(SIGCHLD, SIG_IGN);
69 67
70 setenv("WLC_DIM", "0", 0); 68 setenv("WLC_DIM", "0", 0);
71 69
@@ -152,8 +150,3 @@ int main(int argc, char **argv) {
152 150
153 return 0; 151 return 0;
154} 152}
155
156void sigchld_handle(int signal) {
157 (void) signal;
158 while (waitpid((pid_t)-1, 0, WNOHANG) > 0);
159}