curproc is null if no one is running, but ignore curproc unless wait is true
[unix-history] / usr / src / sys / kern / tty.c
index 8c26a1f..02dd8ea 100644 (file)
@@ -5,7 +5,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)tty.c       7.44 (Berkeley) %G%
+ *     @(#)tty.c       7.45 (Berkeley) %G%
  */
 
 #include "param.h"
  */
 
 #include "param.h"
@@ -1200,7 +1200,8 @@ ttycheckoutq(tp, wait)
 
        hiwat = tp->t_hiwat;
        s = spltty();
 
        hiwat = tp->t_hiwat;
        s = spltty();
-       oldsig = curproc->p_sig;
+       if (wait)
+               oldsig = curproc->p_sig;
        if (tp->t_outq.c_cc > hiwat + 200)
                while (tp->t_outq.c_cc > hiwat) {
                        ttstart(tp);
        if (tp->t_outq.c_cc > hiwat + 200)
                while (tp->t_outq.c_cc > hiwat) {
                        ttstart(tp);