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

Commit 48dfcdb9 authored by Howard Ro's avatar Howard Ro
Browse files

Terminate statsd on a few signals including SIGTERM

- statsd is handling SIGHUP/SIGQUIT/SIGINT/SIGTERM, but doesn't exit.
- The expected behaviour is that statsd would exit after finalizing log
processing when those signals are received.

Bug: 139817664
Bug: 138764189
Test: Send SIGTERM to statsd and check if it is terminated. (note that
init will revive statsd)

Change-Id: Ie45821613664bf030754f835f5481c986ed3cede
Merged-In: Id1146d772f8c68892256ee7a3eea70837fee5c7a
parent e8990235
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -53,6 +53,8 @@ void sigHandler(int sig) {
    if (gStatsService != nullptr) {
        gStatsService->Terminate();
    }
    ALOGW("statsd terminated on receiving signal %d.", sig);
    exit(1);
}

void registerSigHandler()