(no message)
authorBill Joy <bill@ucbvax.Berkeley.EDU>
Tue, 3 Jun 1980 03:39:56 +0000 (19:39 -0800)
committerBill Joy <bill@ucbvax.Berkeley.EDU>
Tue, 3 Jun 1980 03:39:56 +0000 (19:39 -0800)
SCCS-vsn: sys/kern/kern_proc.c 3.7
SCCS-vsn: sys/kern/tty.c 3.7

usr/src/sys/kern/kern_proc.c
usr/src/sys/kern/tty.c

index 4b14300..16ab001 100644 (file)
@@ -1,4 +1,4 @@
-/*     kern_proc.c     3.6     %H%     */
+/*     kern_proc.c     3.7     %H%     */
 
 #include "../h/param.h"
 #include "../h/systm.h"
 
 #include "../h/param.h"
 #include "../h/systm.h"
@@ -493,12 +493,25 @@ done:
                        q->p_ppid = 1;
                        wakeup((caddr_t)&proc[1]);
                        /*
                        q->p_ppid = 1;
                        wakeup((caddr_t)&proc[1]);
                        /*
-                        * Stopped or traced processes are killed
+                        * Traced processes are killed
                         * since their existence means someone is screwing up.
                         * since their existence means someone is screwing up.
+                        * Traced processes are sent a hangup and a continue.
+                        * This is designed to be ``safe'' for setuid
+                        * processes since they must be willing to tolerate
+                        * hangups anyways.
                         */
                         */
-                       if (q->p_stat == SSTOP || q->p_flag&STRC) {
+                       if (q->p_flag&STRC) {
                                q->p_flag &= ~STRC;
                                psignal(q, SIGKILL);
                                q->p_flag &= ~STRC;
                                psignal(q, SIGKILL);
+                       } else if (q->p_stat == SSTOP) {
+                               psignal(q, SIGHUP);
+                               psignal(q, SIGCONT);
+                               /*
+                                * Protect this process from future
+                                * tty signals, and clear TSTP if pending.
+                                */
+                               q->p_pgrp = 0;
+                               q->p_sig &= ~(1<<(SIGTSTP-1));
                        }
                }
        wakeup((caddr_t)p->p_pptr);
                        }
                }
        wakeup((caddr_t)p->p_pptr);
index 6412d7a..2573225 100644 (file)
@@ -1,4 +1,4 @@
-/*     tty.c   3.6     %H%     */
+/*     tty.c   3.7     %H%     */
 
 /*
  * general TTY subroutines
 
 /*
  * general TTY subroutines
@@ -414,6 +414,11 @@ caddr_t addr;
                        u.u_error = EFAULT;
                break;
 
                        u.u_error = EFAULT;
                break;
 
+       case TIOCOUTQ:
+               if (copyout((caddr_t)&tp->t_outq.c_cc, addr, sizeof(tp->t_outq.c_cc)))
+                       u.u_error = EFAULT;
+               break;
+
 /* end of locals */
        default:
                return(0);
 /* end of locals */
        default:
                return(0);