Lines Matching refs:sock
35 static void parent_f(int sock, unsigned long *smap, int child) in parent_f() argument
39 ret = read(sock, &status, sizeof(int)); in parent_f()
46 ret = write(sock, &status, sizeof(int)); in parent_f()
56 static int child_f(int sock, unsigned long *smap, int fd) in child_f() argument
66 ret = write(sock, &buf, sizeof(int)); in child_f()
69 ret = read(sock, &buf, sizeof(int)); in child_f()
81 int sock[2], child, ret; in main() local
106 ret = socketpair(PF_LOCAL, SOCK_SEQPACKET, 0, sock); in main()
113 ret = close(sock[0]); in main()
116 parent_f(sock[1], smap, child); in main()
121 ret = close(sock[1]); in main()
124 return child_f(sock[0], smap, fileno(ftmp)); in main()