From 18737845d3c6a60edd6f75ac441a1b3fed6d66a7 Mon Sep 17 00:00:00 2001 From: San Mehat Date: Thu, 21 Jan 2010 09:22:43 -0800 Subject: [PATCH] netd: Wait when killing tethering services Signed-off-by: San Mehat --- TetherController.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/TetherController.cpp b/TetherController.cpp index 7a352a1..3485a62 100644 --- a/TetherController.cpp +++ b/TetherController.cpp @@ -16,9 +16,13 @@ #include #include +#include + #include #include -#include +#include +#include + #include #include @@ -152,9 +156,11 @@ int TetherController::stopTethering() { LOGD("Stopping tethering services"); kill(mDaemonPid, SIGTERM); + waitpid(mDaemonPid, NULL, 0); mDaemonPid = 0; close(mDaemonFd); mDaemonFd = -1; + LOGD("Tethering services stopped"); return 0; } -- 2.11.0