check send_signal result before further dealing

If send_signal failed, debuggerd_trigger_dump should return
instead of further dealing

Change-Id: I0a1ac4255344d1da7a21917ad559b9de4d5a4fee
Signed-off-by: Liu Changcheng <changcheng.liu@intel.com>
Signed-off-by: Jerry Liu <primerlink@gmail.com>
This commit is contained in:
Liu Changcheng 2017-04-06 11:20:14 +08:00
parent c1c0de3945
commit 3492221fcf
1 changed files with 3 additions and 1 deletions

View File

@ -140,7 +140,9 @@ bool debuggerd_trigger_dump(pid_t pid, unique_fd output_fd, DebuggerdDumpType du
}
bool backtrace = dump_type == kDebuggerdBacktrace;
send_signal(pid, backtrace);
if (!send_signal(pid, backtrace)) {
return false;
}
rc = TEMP_FAILURE_RETRY(recv(set_timeout(sockfd.get()), &response, sizeof(response), MSG_TRUNC));
if (rc == 0) {