don't close sockets when divorcing tty
authorSam Leffler <sam@ucbvax.Berkeley.EDU>
Tue, 1 Feb 1983 06:49:19 +0000 (22:49 -0800)
committerSam Leffler <sam@ucbvax.Berkeley.EDU>
Tue, 1 Feb 1983 06:49:19 +0000 (22:49 -0800)
SCCS-vsn: sbin/routed/main.c 4.4

usr/src/sbin/routed/main.c

index 82fba42..e725ef8 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef lint
 #ifndef lint
-static char sccsid[] = "@(#)main.c     4.3 %G%";
+static char sccsid[] = "@(#)main.c     4.4 %G%";
 #endif
 
 /*
 #endif
 
 /*
@@ -73,8 +73,12 @@ main(argc, argv)
 
                if (fork())
                        exit(0);
 
                if (fork())
                        exit(0);
-               for (cc = 0; cc < 10; cc++)
-                       (void) close(cc);
+               for (t = 0; t < 20; t++)
+                       if (t != s)
+#ifdef COMPAT
+                           if (t != snoroute)
+#endif
+                               (void) close(cc);
                (void) open("/", 0);
                (void) dup2(0, 1);
                (void) dup2(0, 2);
                (void) open("/", 0);
                (void) dup2(0, 1);
                (void) dup2(0, 2);