Lines Matching defs:sock
33 static void 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)");
54 static int child_f(int sock, unsigned long *smap, int fd)
64 ret = write(sock, &buf, sizeof(int));
65 BUG_ON(ret <= 0, "write(sock)");
67 ret = read(sock, &buf, sizeof(int));
68 BUG_ON(ret <= 0, "read(sock)");
79 int sock[2], child, ret;
101 ret = socketpair(PF_LOCAL, SOCK_SEQPACKET, 0, sock);
108 ret = close(sock[0]);
111 parent_f(sock[1], smap, child);
116 ret = close(sock[1]);
119 return child_f(sock[0], smap, fileno(ftmp));