Lines Matching refs:sock
33 static int parent_f(int sock, unsigned long *smap, int child) in parent_f() argument
37 ret = read(sock, &status, sizeof(int)); in parent_f()
44 ret = write(sock, &status, sizeof(int)); in parent_f()
53 static int child_f(int sock, unsigned long *smap, int fd) in child_f() argument
63 ret = write(sock, &buf, sizeof(int)); in child_f()
66 ret = read(sock, &buf, sizeof(int)); in child_f()
77 int sock[2], child, ret; in main() local
96 ret = socketpair(PF_LOCAL, SOCK_SEQPACKET, 0, sock); in main()
103 ret = close(sock[0]); in main()
106 return parent_f(sock[1], smap, child); in main()
109 ret = close(sock[1]); in main()
112 return child_f(sock[0], smap, fileno(ftmp)); in main()