Loading init/init.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -868,6 +868,8 @@ int SecondStageMain(int argc, char** argv) { // Run all property triggers based on current state of the properties. am.QueueBuiltinAction(queue_property_triggers_action, "queue_property_triggers"); // Restore prio before main loop setpriority(PRIO_PROCESS, 0, 0); while (true) { // By default, sleep until something happens. auto epoll_timeout = std::optional<std::chrono::milliseconds>{}; Loading init/main.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -52,7 +52,8 @@ int main(int argc, char** argv) { #if __has_feature(address_sanitizer) __asan_set_error_report_callback(AsanReportCallback); #endif // Boost prio which will be restored later setpriority(PRIO_PROCESS, 0, -20); if (!strcmp(basename(argv[0]), "ueventd")) { return ueventd_main(argc, argv); } Loading init/subcontext.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,8 @@ #include <fcntl.h> #include <poll.h> #include <sys/time.h> #include <sys/resource.h> #include <unistd.h> #include <android-base/file.h> Loading Loading @@ -181,6 +183,8 @@ int SubcontextMain(int argc, char** argv, const BuiltinFunctionMap* function_map trigger_shutdown = [](const std::string& command) { shutdown_command = command; }; auto subcontext_process = SubcontextProcess(function_map, context, init_fd); // Restore prio before main loop setpriority(PRIO_PROCESS, 0, 0); subcontext_process.MainLoop(); return 0; } Loading init/ueventd.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -321,6 +321,8 @@ int ueventd_main(int argc, char** argv) { while (waitpid(-1, nullptr, WNOHANG) > 0) { } // Restore prio before main loop setpriority(PRIO_PROCESS, 0, 0); uevent_listener.Poll([&uevent_handlers](const Uevent& uevent) { for (auto& uevent_handler : uevent_handlers) { uevent_handler->HandleUevent(uevent); Loading Loading
init/init.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -868,6 +868,8 @@ int SecondStageMain(int argc, char** argv) { // Run all property triggers based on current state of the properties. am.QueueBuiltinAction(queue_property_triggers_action, "queue_property_triggers"); // Restore prio before main loop setpriority(PRIO_PROCESS, 0, 0); while (true) { // By default, sleep until something happens. auto epoll_timeout = std::optional<std::chrono::milliseconds>{}; Loading
init/main.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -52,7 +52,8 @@ int main(int argc, char** argv) { #if __has_feature(address_sanitizer) __asan_set_error_report_callback(AsanReportCallback); #endif // Boost prio which will be restored later setpriority(PRIO_PROCESS, 0, -20); if (!strcmp(basename(argv[0]), "ueventd")) { return ueventd_main(argc, argv); } Loading
init/subcontext.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,8 @@ #include <fcntl.h> #include <poll.h> #include <sys/time.h> #include <sys/resource.h> #include <unistd.h> #include <android-base/file.h> Loading Loading @@ -181,6 +183,8 @@ int SubcontextMain(int argc, char** argv, const BuiltinFunctionMap* function_map trigger_shutdown = [](const std::string& command) { shutdown_command = command; }; auto subcontext_process = SubcontextProcess(function_map, context, init_fd); // Restore prio before main loop setpriority(PRIO_PROCESS, 0, 0); subcontext_process.MainLoop(); return 0; } Loading
init/ueventd.cpp +2 −0 Original line number Diff line number Diff line Loading @@ -321,6 +321,8 @@ int ueventd_main(int argc, char** argv) { while (waitpid(-1, nullptr, WNOHANG) > 0) { } // Restore prio before main loop setpriority(PRIO_PROCESS, 0, 0); uevent_listener.Poll([&uevent_handlers](const Uevent& uevent) { for (auto& uevent_handler : uevent_handlers) { uevent_handler->HandleUevent(uevent); Loading