Lines Matching refs:sd
65 int sd, flags, one;
80 sd = socket(PF_LOCAL, SOCK_STREAM, 0);
81 if (sd < 0)
84 if (setsockopt(sd, SOL_SOCKET, SO_REUSEADDR, &one,
87 if (bind(sd, (struct sockaddr *)&sun, sizeof(sun)) < 0) {
88 close(sd);
91 if (listen(sd, 10) != 0)
94 (void)close(sd);
100 sd = socket(PF_LOCAL, SOCK_STREAM, 0);
101 if (sd < 0)
103 if ((flags = fcntl(sd, F_GETFL, 0)) < 0)
106 if (fcntl(sd, F_SETFL, flags) < 0)
108 (void)connect(sd, (struct sockaddr *)&sun, sizeof(sun));
110 (void)close(sd);