resolved conflicts for merge of e36a3a2f to jb-dev-plus-aosp

Change-Id: I566b0e96327f318313c17a11d35539554b075f59
diff --git a/TetherController.cpp b/TetherController.cpp
index 9ff1bc4..8d14a14 100644
--- a/TetherController.cpp
+++ b/TetherController.cpp
@@ -134,17 +134,19 @@
             close(pipefd[0]);
         }
 
-        int num_processed_args = 5 + (num_addrs/2) + 1; // 1 null for termination
+        int num_processed_args = 7 + (num_addrs/2) + 1; // 1 null for termination
         char **args = (char **)malloc(sizeof(char *) * num_processed_args);
         args[num_processed_args - 1] = NULL;
         args[0] = (char *)"/system/bin/dnsmasq";
-        args[1] = (char *)"--no-daemon";
+        args[1] = (char *)"--keep-in-foreground";
         args[2] = (char *)"--no-resolv";
         args[3] = (char *)"--no-poll";
         // TODO: pipe through metered status from ConnService
         args[4] = (char *)"--dhcp-option-force=43,ANDROID_METERED";
+        args[5] = (char *)"--pid-file";
+        args[6] = (char *)"";
 
-        int nextArg = 5;
+        int nextArg = 7;
         for (int addrIndex=0; addrIndex < num_addrs;) {
             char *start = strdup(inet_ntoa(addrs[addrIndex++]));
             char *end = strdup(inet_ntoa(addrs[addrIndex++]));