diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-04-19 01:09:11 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-04-19 01:09:11 +0000 |
commit | fde38e79c28da34a3fda5557e55f28be41b7d9f5 (patch) | |
tree | 710ed2f70d2d8b2fec91cb1e2e4c44daf13eaf62 | |
parent | 1008d0cdbba1f3f73a2f41616d3e2d8d7073cf4e (diff) | |
parent | 6f91c1b3a63879807ca9034e1e7912731314c659 (diff) | |
download | android-clat-android14-s2-release.tar.gz |
Snap for 9966400 from 6f91c1b3a63879807ca9034e1e7912731314c659 to udc-releaseandroid-vts-14.0_r4android-vts-14.0_r3android-vts-14.0_r2android-vts-14.0_r1android-security-14.0.0_r9android-security-14.0.0_r8android-security-14.0.0_r7android-security-14.0.0_r6android-security-14.0.0_r5android-security-14.0.0_r4android-security-14.0.0_r3android-security-14.0.0_r2android-security-14.0.0_r1android-platform-14.0.0_r7android-platform-14.0.0_r6android-platform-14.0.0_r5android-platform-14.0.0_r4android-platform-14.0.0_r3android-platform-14.0.0_r2android-platform-14.0.0_r1android-cts-14.0_r4android-cts-14.0_r3android-cts-14.0_r2android-cts-14.0_r1android-14.0.0_r28android-14.0.0_r2android-14.0.0_r15android-14.0.0_r14android-14.0.0_r13android-14.0.0_r1android14-tests-releaseandroid14-security-releaseandroid14-s2-releaseandroid14-s1-releaseandroid14-releaseandroid14-platform-release
Change-Id: Iad71eee555d295892a364accb55e10e3b51d7d60
-rw-r--r-- | main.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -194,8 +194,12 @@ int main(int argc, char **argv) { if (running) { logmsg(ANDROID_LOG_INFO, "Clatd on %s waiting for SIGTERM", uplink_interface); - while (running) sleep(60); - logmsg(ANDROID_LOG_INFO, "Clatd on %s received SIGTERM", uplink_interface); + // let's give higher level java code 15 seconds to kill us, + // but eventually terminate anyway, in case system server forgets about us... + // sleep() should be interrupted by SIGTERM, the handler should clear running + sleep(15); + logmsg(ANDROID_LOG_INFO, "Clatd on %s %s SIGTERM", uplink_interface, + running ? "timed out waiting for" : "received"); } else { logmsg(ANDROID_LOG_INFO, "Clatd on %s already received SIGTERM", uplink_interface); } |