-#ifdef BSD2_9
- for(;;) {
- signal(SIGCHLD, dologout);
- s = socket(SOCK_STREAM, 0, &myctladdr,
- SO_ACCEPTCONN|SO_KEEPALIVE);
- if (s < 0) {
- perror("uucpd: socket");
- exit(1);
- }
- if (accept(s, &hisctladdr) < 0) {
- if (errno == EINTR) {
- close(s);
- continue;
- }
- perror("uucpd: accept");
- exit(1);
- }
- if (fork() == 0) {
- close(0); close(1); close(2);
- dup(s); dup(s); dup(s);
- close(s);
- doit(&hisctladdr);
- exit(1);
- }
- }
-#endif BSD2_9