Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-6]: src/sys/kern Pull up revision 1.139 (requested by jdolocek ...



details:   https://anonhg.NetBSD.org/src/rev/2433a7fa184c
branches:  netbsd-1-6
changeset: 528522:2433a7fa184c
user:      lukem <lukem%NetBSD.org@localhost>
date:      Mon Jul 22 04:34:30 2002 +0000

description:
Pull up revision 1.139 (requested by jdolocek in ticket #535):
Make sure repeated TIOCSCTTY doesn't corrupt session hold count.
Fixes kern/17382 by David Laight.

diffstat:

 sys/kern/tty.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (29 lines):

diff -r 0c2f5bf32882 -r 2433a7fa184c sys/kern/tty.c
--- a/sys/kern/tty.c    Mon Jul 22 04:09:06 2002 +0000
+++ b/sys/kern/tty.c    Mon Jul 22 04:34:30 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tty.c,v 1.138 2002/05/02 13:38:57 enami Exp $  */
+/*     $NetBSD: tty.c,v 1.138.4.1 2002/07/22 04:34:30 lukem Exp $      */
 
 /*-
  * Copyright (c) 1982, 1986, 1990, 1991, 1993
@@ -41,7 +41,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tty.c,v 1.138 2002/05/02 13:38:57 enami Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tty.c,v 1.138.4.1 2002/07/22 04:34:30 lukem Exp $");
 
 #include "opt_uconsole.h"
 
@@ -987,6 +987,10 @@
                    ((p->p_session->s_ttyvp || tp->t_session) &&
                    (tp->t_session != p->p_session)))
                        return (EPERM);
+
+               if (tp->t_session)
+                       SESSRELE(tp->t_session);
+
                SESSHOLD(p->p_session);
                tp->t_session = p->p_session;
                tp->t_pgrp = p->p_pgrp;



Home | Main Index | Thread Index | Old Index