From owner-freebsd-hackers Fri Oct 23 23:45:33 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id XAA21175 for freebsd-hackers-outgoing; Fri, 23 Oct 1998 23:45:33 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from lor.watermarkgroup.com (lor.watermarkgroup.com [207.202.73.33]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id XAA21170 for ; Fri, 23 Oct 1998 23:45:31 -0700 (PDT) (envelope-from luoqi@watermarkgroup.com) Received: (from luoqi@localhost) by lor.watermarkgroup.com (8.8.8/8.8.8) id CAA00573; Sat, 24 Oct 1998 02:44:18 -0400 (EDT) (envelope-from luoqi) Date: Sat, 24 Oct 1998 02:44:18 -0400 (EDT) From: Luoqi Chen Message-Id: <199810240644.CAA00573@lor.watermarkgroup.com> To: Don.Lewis@tsc.tdk.com, hackers@FreeBSD.ORG, jau@jau.tmt.tele.fi Subject: Re: question about getsid() Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > I looked at this some more and it appears I was mistaken. When the > session leader exits, exit1() in kern_exit.c does > sp->s_leader = NULL; > This means that getsid() will dereference the NULL pointer and panic > the system. > > getsid() needs to verify s_leader is not NULL before dereferencing it, > but what should getsid() return if there is no session leader? > If the session leader is gone, the session losts the ability to acquire a controlling terminal, which is the sole purpose of its existence. This session should be disbanded, and member process groups join session 0. -lq To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message