Android-x86
Fork

  • R/O
  • HTTP
  • SSH
  • HTTPS

system-core: コミット

system/core


コミットメタ情報

リビジョンd5fcea9f58d85400164b77c77235b9d5e40ffee6 (tree)
日時2019-03-28 19:36:05
作者Chih-Wei Huang <cwhuang@linu...>
コミッターChih-Wei Huang

ログメッセージ

init: handle ctrl-alt-del event

By setting /proc/sys/kernel/ctrl-alt-del to 1, kernel will trap
ctrl-alt-del event and send a SIGINT signal to init.

Start the ctrl-alt-del service on receiving the signal.

変更サマリ

差分

--- a/init/init.cpp
+++ b/init/init.cpp
@@ -490,6 +490,12 @@ static void InstallRebootSignalHandlers() {
490490 #endif
491491 sigaction(SIGSYS, &action, nullptr);
492492 sigaction(SIGTRAP, &action, nullptr);
493+
494+ action.sa_handler = [](int sig) {
495+ LOG(INFO) << "Got ctrl-alt-del: " << sig;
496+ HandleControlMessage("start", "ctrl-alt-del", getpid());
497+ };
498+ sigaction(SIGINT, &action, nullptr);
493499 }
494500
495501 static void HandleSigtermSignal() {
旧リポジトリブラウザで表示