Lines Matching defs:sock
31 static int parent_f(int sock, unsigned long *smap, int child)
35 ret = read(sock, &status, sizeof(int));
36 BUG_ON(ret <= 0, "read(sock)");
42 ret = write(sock, &status, sizeof(int));
43 BUG_ON(ret <= 0, "write(sock)");
51 static int child_f(int sock, unsigned long *smap, int fd)
61 ret = write(sock, &buf, sizeof(int));
62 BUG_ON(ret <= 0, "write(sock)");
64 ret = read(sock, &buf, sizeof(int));
65 BUG_ON(ret <= 0, "read(sock)");
75 int sock[2], child, ret;
94 ret = socketpair(PF_LOCAL, SOCK_SEQPACKET, 0, sock);
101 ret = close(sock[0]);
104 return parent_f(sock[1], smap, child);
107 ret = close(sock[1]);
110 return child_f(sock[0], smap, fileno(ftmp));