Lines Matching defs:sock_fd
32 static int send_request(int sock_fd, void* msg_ptr, size_t msg_len) {
34 if (TEMP_FAILURE_RETRY(write(sock_fd, msg_ptr, msg_len)) != (ssize_t) msg_len) {
38 if (TEMP_FAILURE_RETRY(read(sock_fd, &ack, 1)) != 1) {
51 int sock_fd = socket_local_client(DEBUGGER_SOCKET_NAME, ANDROID_SOCKET_NAMESPACE_ABSTRACT,
53 if (sock_fd < 0) {
61 if (setsockopt(sock_fd, SOL_SOCKET, SO_RCVTIMEO, &tm, sizeof(tm)) == -1) {
65 if (setsockopt(sock_fd, SOL_SOCKET, SO_SNDTIMEO, &tm, sizeof(tm)) == -1) {
70 if (send_request(sock_fd, &msg, sizeof(msg)) < 0) {
71 close(sock_fd);
75 return sock_fd;
83 int sock_fd = make_dump_request(DEBUGGER_ACTION_DUMP_BACKTRACE, tid, timeout_secs);
84 if (sock_fd < 0) {
92 while ((n = TEMP_FAILURE_RETRY(read(sock_fd, buffer, sizeof(buffer)))) > 0) {
98 close(sock_fd);
107 int sock_fd = make_dump_request(DEBUGGER_ACTION_DUMP_TOMBSTONE, tid, timeout_secs);
108 if (sock_fd < 0) {
115 ssize_t n = TEMP_FAILURE_RETRY(read(sock_fd, buffer, sizeof(buffer) - 1));
127 close(sock_fd);