signal to minor daemon caused /dev/printer to be removed.
authorRalph Campbell <ralph@ucbvax.Berkeley.EDU>
Fri, 19 Aug 1983 06:23:26 +0000 (22:23 -0800)
committerRalph Campbell <ralph@ucbvax.Berkeley.EDU>
Fri, 19 Aug 1983 06:23:26 +0000 (22:23 -0800)
SCCS-vsn: usr.sbin/lpr/lpd/lpd.c 4.9
SCCS-vsn: usr.sbin/lpr/lpd/printjob.c 4.14

usr/src/usr.sbin/lpr/lpd/lpd.c
usr/src/usr.sbin/lpr/lpd/printjob.c

index ed2f27b..930dd83 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef lint
 #ifndef lint
-static char sccsid[] = "@(#)lpd.c      4.8 (Berkeley) %G%";
+static char sccsid[] = "@(#)lpd.c      4.9 (Berkeley) %G%";
 #endif
 
 /*
 #endif
 
 /*
@@ -169,6 +169,10 @@ main(argc, argv)
                }
                if (fork() == 0) {
                        signal(SIGCHLD, SIG_IGN);
                }
                if (fork() == 0) {
                        signal(SIGCHLD, SIG_IGN);
+                       signal(SIGHUP, SIG_IGN);
+                       signal(SIGINT, SIG_IGN);
+                       signal(SIGQUIT, SIG_IGN);
+                       signal(SIGTERM, SIG_IGN);
                        (void) close(funix);
                        (void) close(finet);
                        dup2(s, 1);
                        (void) close(funix);
                        (void) close(finet);
                        dup2(s, 1);
index e95cb85..8db30c7 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef lint
 #ifndef lint
-static char sccsid[] = "@(#)printjob.c 4.13 (Berkeley) %G%";
+static char sccsid[] = "@(#)printjob.c 4.14 (Berkeley) %G%";
 #endif
 
 /*
 #endif
 
 /*
@@ -55,7 +55,10 @@ printjob()
        dup(1);
        pid = getpid();                         /* for use with lprm */
        setpgrp(0, pid);
        dup(1);
        pid = getpid();                         /* for use with lprm */
        setpgrp(0, pid);
+       signal(SIGHUP, onintr);
        signal(SIGINT, onintr);
        signal(SIGINT, onintr);
+       signal(SIGQUIT, onintr);
+       signal(SIGTERM, onintr);
 
        /*
         * uses short form file names
 
        /*
         * uses short form file names
@@ -875,7 +878,7 @@ dofork(action)
 }
 
 /*
 }
 
 /*
- * Cleanup child processes when a SIGINT is caught.
+ * Cleanup child processes when a signal is caught.
  */
 static
 onintr()
  */
 static
 onintr()