4 #include <sys/socket.h>
9 int main(int argc, char *argv[])
12 struct sockaddr_un sock_address;
20 sock_path = getenv(SOCK_PATH);
22 if (sock_path == NULL)
26 sock_address.sun_family = AF_UNIX;
27 strcpy(sock_address.sun_path, sock_path);
29 sock_fd = socket(AF_UNIX, SOCK_STREAM, 0);
30 connect(sock_fd, (struct sockaddr *) &sock_address, sizeof(sock_address));
32 send(sock_fd, msg, strlen(msg), 0);
33 if ((nbr = recv(sock_fd, rsp, sizeof(rsp), 0)) > 0) {
35 if (strcmp(rsp, EMPTY_RESPONSE) != 0)