Lines Matching refs:ufd
74 static int ufd; /* shared between do_child and start_server */ variable
196 maybe_run_child(&do_child, "dd", &sfd, &ufd); in main()
344 close(ufd); in cleanup1()
351 close(ufd); in cleanup2()
389 ufd = socket(PF_UNIX, SOCK_STREAM, 0); in start_server()
390 if (ufd < 0) { in start_server()
394 if (bind(ufd, (struct sockaddr *)ssun, sizeof(*ssun))) { in start_server()
398 if (listen(ufd, 10) < 0) { in start_server()
406 if (self_exec(argv0, "dd", sfd, ufd) < 0) in start_server()
418 (void)close(ufd); in start_server()
433 FD_SET(ufd, &afds); in do_child()
435 nfds = MAX(sfd + 1, ufd + 1); in do_child()
463 if (FD_ISSET(ufd, &rfds)) { in do_child()
467 newfd = accept(ufd, (struct sockaddr *)&fsun, &fromlen); in do_child()
474 if (fd != sfd && fd != ufd && FD_ISSET(fd, &rfds)) { in do_child()