ignore SIGCHLD in child
authorSam Leffler <sam@ucbvax.Berkeley.EDU>
Tue, 22 Feb 1983 11:42:14 +0000 (03:42 -0800)
committerSam Leffler <sam@ucbvax.Berkeley.EDU>
Tue, 22 Feb 1983 11:42:14 +0000 (03:42 -0800)
SCCS-vsn: libexec/telnetd/telnetd.c 4.18
SCCS-vsn: libexec/rlogind/rlogind.c 4.11
SCCS-vsn: libexec/rshd/rshd.c 4.13
SCCS-vsn: libexec/rexecd/rexecd.c 4.8

usr/src/libexec/rexecd/rexecd.c
usr/src/libexec/rlogind/rlogind.c
usr/src/libexec/rshd/rshd.c
usr/src/libexec/telnetd/telnetd.c

index 7c826b7..2a8163a 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef lint
 #ifndef lint
-static char sccsid[] = "@(#)rexecd.c   4.7 83/01/22";
+static char sccsid[] = "@(#)rexecd.c   4.8 83/02/21";
 #endif
 
 #include <sys/ioctl.h>
 #endif
 
 #include <sys/ioctl.h>
@@ -81,8 +81,10 @@ main(argc, argv)
                        sleep(1);
                        continue;
                }
                        sleep(1);
                        continue;
                }
-               if (fork() == 0)
+               if (fork() == 0) {
+                       signal(SIGCHLD, SIG_IGN);
                        doit(s, &from);
                        doit(s, &from);
+               }
                (void) close(s);
        }
 }
                (void) close(s);
        }
 }
index 939afcd..007eb28 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef lint
 #ifndef lint
-static char sccsid[] = "@(#)rlogind.c  4.10 83/01/22";
+static char sccsid[] = "@(#)rlogind.c  4.11 83/02/21";
 #endif
 
 #include <stdio.h>
 #endif
 
 #include <stdio.h>
@@ -101,8 +101,10 @@ main(argc, argv)
                        perror("rlogind: accept");
                        continue;
                }
                        perror("rlogind: accept");
                        continue;
                }
-               if (fork() == 0)
+               if (fork() == 0) {
+                       signal(SIGCHLD, SIG_IGN);
                        doit(s, &from);
                        doit(s, &from);
+               }
                close(s);
        }
 }
                close(s);
        }
 }
index 6ccdb7c..db4b592 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef lint
 #ifndef lint
-static char sccsid[] = "@(#)rshd.c     4.12 83/02/10";
+static char sccsid[] = "@(#)rshd.c     4.13 83/02/21";
 #endif
 
 #include <sys/ioctl.h>
 #endif
 
 #include <sys/ioctl.h>
@@ -103,6 +103,7 @@ main(argc, argv)
                }
                if (fork() == 0) {
                        close(f);
                }
                if (fork() == 0) {
                        close(f);
+                       signal(SIGCHLD, SIG_IGN);
                        doit(g, &from);
                }
                close(g);
                        doit(g, &from);
                }
                close(g);
index bf20f62..a808fd3 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef lint
 #ifndef lint
-static char sccsid[] = "@(#)telnetd.c  4.17 83/01/22";
+static char sccsid[] = "@(#)telnetd.c  4.18 83/02/21";
 #endif
 
 /*
 #endif
 
 /*
@@ -119,8 +119,10 @@ again:
                }
                if ((pid = fork()) < 0)
                        printf("Out of processes\n");
                }
                if ((pid = fork()) < 0)
                        printf("Out of processes\n");
-               else if (pid == 0)
+               else if (pid == 0) {
+                       signal(SIGCHLD, SIG_IGN);
                        doit(s2);
                        doit(s2);
+               }
                close(s2);
        }
        /*NOTREACHED*/
                close(s2);
        }
        /*NOTREACHED*/