Fix for TIOCSIG: pgsignal() was being called with
authorPaul Borman <borman@ucbvax.Berkeley.EDU>
Wed, 12 Sep 1990 06:53:50 +0000 (22:53 -0800)
committerPaul Borman <borman@ucbvax.Berkeley.EDU>
Wed, 12 Sep 1990 06:53:50 +0000 (22:53 -0800)
one too few arguments.  Add special case for SIGINFO to call
ttyinfo().

SCCS-vsn: sys/kern/tty_pty.c 7.16

usr/src/sys/kern/tty_pty.c

index 61a159b..fd97a11 100644 (file)
@@ -4,7 +4,7 @@
  *
  * %sccs.include.redist.c%
  *
  *
  * %sccs.include.redist.c%
  *
- *     @(#)tty_pty.c   7.15 (Berkeley) %G%
+ *     @(#)tty_pty.c   7.16 (Berkeley) %G%
  */
 
 /*
  */
 
 /*
@@ -664,7 +664,10 @@ ptyioctl(dev, cmd, data, flag)
                                return(EINVAL);
                        if ((tp->t_lflag&NOFLSH) == 0)
                                ttyflush(tp, FREAD|FWRITE);
                                return(EINVAL);
                        if ((tp->t_lflag&NOFLSH) == 0)
                                ttyflush(tp, FREAD|FWRITE);
-                       pgsignal(tp->t_pgrp, *(unsigned int *)data);
+                       pgsignal(tp->t_pgrp, *(unsigned int *)data, 1);
+                       if ((*(unsigned int *)data == SIGINFO) &&
+                           ((tp->t_lflag&NOKERNINFO) == 0))
+                               ttyinfo(tp);
                        return(0);
                }
        } else if (pti->pt_flags & PF_TIOC) {
                        return(0);
                }
        } else if (pti->pt_flags & PF_TIOC) {