Lines Matching refs:sock
51 wait_on_socket (int sock, long int usectmo) in wait_on_socket() argument
54 fds[0].fd = sock; in wait_on_socket()
169 int sock; in open_socket() local
171 sock = __socket (PF_UNIX, SOCK_STREAM | SOCK_CLOEXEC | SOCK_NONBLOCK, 0); in open_socket()
172 if (sock < 0) in open_socket()
185 if (__connect (sock, (struct sockaddr *) &sun, sizeof (sun)) < 0 in open_socket()
202 ssize_t wres = TEMP_FAILURE_RETRY (__send (sock, reqdata, in open_socket()
207 return sock; in open_socket()
229 fds[0].fd = sock; in open_socket()
239 __close_nocancel_nostatus (sock); in open_socket()
269 int sock = open_socket (type, key, keylen); in __nscd_get_mapping() local
270 if (sock < 0) in __nscd_get_mapping()
302 if (wait_on_socket (sock, 5 * 1000) <= 0) in __nscd_get_mapping()
308 ssize_t n = TEMP_FAILURE_RETRY (__recvmsg (sock, &msg, MSG_CMSG_CLOEXEC)); in __nscd_get_mapping()
385 __close (sock); in __nscd_get_mapping()
545 int sock = open_socket (type, key, keylen); in __nscd_open_socket() local
546 if (sock >= 0) in __nscd_open_socket()
549 if (wait_on_socket (sock, 5 * 1000) > 0) in __nscd_open_socket()
551 ssize_t nbytes = TEMP_FAILURE_RETRY (__read (sock, response, in __nscd_open_socket()
554 return sock; in __nscd_open_socket()
557 __close_nocancel_nostatus (sock); in __nscd_open_socket()