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