adb: replace failing exits in adbd with abort().
This makes it possible to get a core dump from adbd when it decides to
exit.
Bug: http://b/28347842
Change-Id: I4cfe5f273f62b2c32e61232d3c39881ecdd6b582
diff --git a/adb/shell_service.cpp b/adb/shell_service.cpp
index 3eeed34..374b468 100644
--- a/adb/shell_service.cpp
+++ b/adb/shell_service.cpp
@@ -412,7 +412,7 @@
for (const char* message : messages) {
WriteFdExactly(error_sfd->fd(), message);
}
- exit(-1);
+ abort();
}
if (make_pty_raw_) {
@@ -421,7 +421,7 @@
int saved_errno = errno;
WriteFdExactly(error_sfd->fd(), "tcgetattr failed: ");
WriteFdExactly(error_sfd->fd(), strerror(saved_errno));
- exit(-1);
+ abort();
}
cfmakeraw(&tattr);
@@ -429,7 +429,7 @@
int saved_errno = errno;
WriteFdExactly(error_sfd->fd(), "tcsetattr failed: ");
WriteFdExactly(error_sfd->fd(), strerror(saved_errno));
- exit(-1);
+ abort();
}
}