Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern When freeing a session, remove the reference to it ...
details: https://anonhg.NetBSD.org/src/rev/a27258416f9c
branches: trunk
changeset: 503344:a27258416f9c
user: pk <pk%NetBSD.org@localhost>
date: Sun Feb 04 22:32:24 2001 +0000
description:
When freeing a session, remove the reference to it from the associated tty.
diffstat:
sys/kern/kern_proc.c | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diffs (28 lines):
diff -r 3a1ebd8802cc -r a27258416f9c sys/kern/kern_proc.c
--- a/sys/kern/kern_proc.c Sun Feb 04 22:32:15 2001 +0000
+++ b/sys/kern/kern_proc.c Sun Feb 04 22:32:24 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_proc.c,v 1.43 2000/11/08 14:28:13 ad Exp $ */
+/* $NetBSD: kern_proc.c,v 1.44 2001/02/04 22:32:24 pk Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -439,12 +439,17 @@
struct pgrp *pgrp;
{
+ /* Remove reference (if any) from tty to this process group */
if (pgrp->pg_session->s_ttyp != NULL &&
pgrp->pg_session->s_ttyp->t_pgrp == pgrp)
pgrp->pg_session->s_ttyp->t_pgrp = NULL;
LIST_REMOVE(pgrp, pg_hash);
- if (--pgrp->pg_session->s_count == 0)
+ if (--pgrp->pg_session->s_count == 0) {
+ /* Remove reference (if any) from tty to this session */
+ if (pgrp->pg_session->s_ttyp != NULL)
+ pgrp->pg_session->s_ttyp->t_session = NULL;
FREE(pgrp->pg_session, M_SESSION);
+ }
pool_put(&pgrp_pool, pgrp);
}
Home |
Main Index |
Thread Index |
Old Index