Date: Tue, 31 Oct 2000 08:30:41 +0000 (GMT) From: Terry Lambert <tlambert@primenet.com> To: andrew@ugh.net.au Cc: ryan@sasknow.com (Ryan Thompson), freebsd-hackers@FreeBSD.ORG Subject: Re: Logging users out Message-ID: <200010310830.BAA27815@usr02.primenet.com> In-Reply-To: <Pine.BSF.4.21.0010302019270.7801-100000@starbug.ugh.net.au> from "andrew@ugh.net.au" at Oct 30, 2000 08:53:27 PM
next in thread | previous in thread | raw e-mail | index | archive | help
> > Why not just kill their controlling shell? > > I believe that what I'm doing...the "controlling shell" would be the > session leader. The question is how to get its PID. Grovel the tty structure using libkvm. You want to look for: (struct tty *)->t_pgrp->pg_id Which is the process ID of the group leader of the foregroun group. Or you could just make revoke do its thing in the right order instead of the wrong order, since a program with non-blocking fds (read: any threads program) would have to be clairvoyant (or check every time by trying to open /dev/tty, and noting when that failed). Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200010310830.BAA27815>
