clat: log if SIGKILL fails am: 74b0d066c6 am: 7eb0f851dc
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/2535199
Change-Id: I042e91500fafadb34bd30eacc51d42776aec775c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/service/jni/com_android_server_connectivity_ClatCoordinator.cpp b/service/jni/com_android_server_connectivity_ClatCoordinator.cpp
index dbb12ee..19f2fb8 100644
--- a/service/jni/com_android_server_connectivity_ClatCoordinator.cpp
+++ b/service/jni/com_android_server_connectivity_ClatCoordinator.cpp
@@ -500,7 +500,9 @@
if (ret == 0) {
ALOGE("Failed to SIGTERM clatd pid=%d, try SIGKILL", pid);
// TODO: fix that kill failed or waitpid doesn't return.
- kill(pid, SIGKILL);
+ if (kill(pid, SIGKILL)) {
+ ALOGE("Failed to SIGKILL clatd pid=%d: %s", pid, strerror(errno));
+ }
ret = waitpid(pid, &status, 0);
}
if (ret == -1) {