Android-x86
Fork
Donation

  • R/O
  • HTTP
  • SSH
  • HTTPS

system-core: Commit

system/core


Commit MetaInfo

Revision75ff266e97d0cfc2c5ae267108b0e1dbb4940e87 (tree)
Time2018-02-13 12:39:42
AuthorChih-Wei Huang <cwhuang@linu...>
CommiterChih-Wei Huang

Log Message

Merge remote-tracking branch 'x86/nougat-x86' into cm-14.1-x86

Conflicts:
init/init.cpp

Change Summary

Incremental Difference

--- a/init/init.cpp
+++ b/init/init.cpp
@@ -557,6 +557,19 @@ static int charging_mode_booting(void) {
557557 #endif
558558 }
559559
560+static void install_signal_handlers()
561+{
562+ struct sigaction action;
563+ memset(&action, 0, sizeof(action));
564+ sigfillset(&action.sa_mask);
565+ action.sa_flags = SA_RESTART;
566+ action.sa_handler = [](int sig) {
567+ NOTICE("Got ctrl-alt-del: %d", sig);
568+ handle_control_message("start", "ctrl-alt-del");
569+ };
570+ sigaction(SIGINT, &action, nullptr);
571+}
572+
560573 int main(int argc, char** argv) {
561574 if (strstr(argv[0], "modprobe")) {
562575 return modprobe_main(argc, argv);
@@ -570,6 +583,8 @@ int main(int argc, char** argv) {
570583 return watchdogd_main(argc, argv);
571584 }
572585
586+ install_signal_handlers();
587+
573588 // Clear the umask.
574589 umask(0);
575590
--- a/libutils/Unicode.cpp
+++ b/libutils/Unicode.cpp
@@ -19,6 +19,7 @@
1919
2020 #include <limits.h>
2121 #include <stddef.h>
22+#include <limits.h>
2223
2324 #if defined(_WIN32)
2425 # undef nhtol
Show on old repository browser