Switch init to epoll.
Not just because it's what the cool kids are doing --- it also lets us
simplify the inner loop and decouple it from whatever systems want to
be woken to perform some activity if there's data to be read on some fd.
Currently this is just used to clean up the existing signal handling,
keychord, and property service code.
Change-Id: I4d7541a2c4386957ad877df69e3be08b96a7dec5
diff --git a/init/property_service.cpp b/init/property_service.cpp
index 94c5fd9..930ef82 100644
--- a/init/property_service.cpp
+++ b/init/property_service.cpp
@@ -246,7 +246,7 @@
return rc;
}
-void handle_property_set_fd()
+static void handle_property_set_fd()
{
prop_msg msg;
int s;
@@ -527,8 +527,6 @@
}
listen(property_set_fd, 8);
-}
-int get_property_set_fd() {
- return property_set_fd;
+ register_epoll_handler(property_set_fd, handle_property_set_fd);
}