Lines Matching defs:sock
33 static int parent_f(int sock, unsigned long *smap, int child)
37 ret = read(sock, &status, sizeof(int));
38 BUG_ON(ret <= 0, "read(sock)");
44 ret = write(sock, &status, sizeof(int));
45 BUG_ON(ret <= 0, "write(sock)");
53 static int child_f(int sock, unsigned long *smap, int fd)
63 ret = write(sock, &buf, sizeof(int));
64 BUG_ON(ret <= 0, "write(sock)");
66 ret = read(sock, &buf, sizeof(int));
67 BUG_ON(ret <= 0, "read(sock)");
77 int sock[2], child, ret;
96 ret = socketpair(PF_LOCAL, SOCK_SEQPACKET, 0, sock);
103 ret = close(sock[0]);
106 return parent_f(sock[1], smap, child);
109 ret = close(sock[1]);
112 return child_f(sock[0], smap, fileno(ftmp));