Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 615d9399 authored by Josh Gao's avatar Josh Gao
Browse files

crash_dump: clear the signal mask.

crash_dump inherits its signal mask from the thread that forked it,
which always has all of its signals blocked, now that sigchain respects
sa_mask.

Manually clear the signal mask, and reduce the timeout to a
still-generous 2 seconds.

Bug: http://b/38427757
Test: manually inserted sleep in crash_dump
Merged-In: If1c9adb68777b71fb19d9b0f47d6998733ed8f52
Change-Id: If1c9adb68777b71fb19d9b0f47d6998733ed8f52
(cherry picked from commit e740250b)
parent 8ecf5943
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -212,6 +212,12 @@ int main(int argc, char** argv) {
    return 1;
  }

  sigset_t mask;
  sigemptyset(&mask);
  if (sigprocmask(SIG_SETMASK, &mask, nullptr) != 0) {
    PLOG(FATAL) << "failed to set signal mask";
  }

  pid_t main_tid;
  pid_t pseudothread_tid;

@@ -259,7 +265,7 @@ int main(int argc, char** argv) {
  }

  // Die if we take too long.
  alarm(20);
  alarm(2);

  std::string attach_error;