OSDN Git Service

Abort using SIGABRT instead of SIGKILL on command_timeout
authorAndre Eisenbach <eisenbach@google.com>
Fri, 17 Mar 2017 04:58:53 +0000 (21:58 -0700)
committerAndre Eisenbach <eisenbach@google.com>
Fri, 17 Mar 2017 06:08:40 +0000 (06:08 +0000)
This will produce a stack trace and flag for automated crash reporting.

Bug: 36026072
Test: net_test_bluetooth; device off/on/off tests
Change-Id: I4d4380d61028261ba7bb4599e39993cae1d906a5

hci/src/hci_layer.cc

index c961d8e..dcb1d84 100644 (file)
@@ -409,7 +409,7 @@ static void command_timed_out(UNUSED_ATTR void* context) {
 
   LOG_ERROR(LOG_TAG, "%s restarting the bluetooth process.", __func__);
   usleep(10000);
-  kill(getpid(), SIGKILL);
+  abort();
 }
 
 // Event/packet receiving functions