From owner-freebsd-hackers Mon Oct 30 20:28: 1 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from homer.softweyr.com (bsdconspiracy.net [208.187.122.220]) by hub.freebsd.org (Postfix) with ESMTP id 7ACB537B4C5 for ; Mon, 30 Oct 2000 20:27:51 -0800 (PST) Received: from [127.0.0.1] (helo=softweyr.com ident=Fools trust ident!) by homer.softweyr.com with esmtp (Exim 3.16 #1) id 13qSkR-0000Fj-00; Mon, 30 Oct 2000 21:10:07 -0700 Message-ID: <39FE461F.3F47EA7@softweyr.com> Date: Mon, 30 Oct 2000 21:10:07 -0700 From: Wes Peters Organization: Softweyr LLC X-Mailer: Mozilla 4.75 [en] (X11; U; Linux 2.2.12 i386) X-Accept-Language: en MIME-Version: 1.0 To: Joe Greco Cc: Greg Black , hackers@freebsd.org, ryan@sasknow.com, andrew@ugh.net.au Subject: Re: Logging users out References: <200010302102.PAA81188@aurora.sol.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Joe Greco wrote: > > > > I wrote a little line program to do a revoke(), it was basically > > > > > > int main(int argc, char *argv[]) { revoke(argv[1]); } > > > > > > Now this doesn't kill a darn thing. And you should be aware of it! But it > > > does forcibly "close" any open fd's pointing at the tty in question, and > > > most programs will get the hint and go away. > > > > Not all programs, and that can lead to all sorts of problems > > with processes that never die. There are many stories of this > > happening with vi, for example. > > That's why I said, "most programs". > > > > For some uses, especially predictable uses, this is probably a lot simpler > > > and a lot more foolproof. > > > > Simple: yes. Foolproof: definitely no. > > Uh, well, "foolproof" != "calling ps and awk and grep and looking for > processes". For ANY definition of foolproof. No, but walking the active process table looking for session leaders is not that difficult. In fact, this was the first program I ever wrote on FreeBSD, back on 1.0. Unfortunately, it was a commercial product Axent Technologies never released, but later folded into UNIX Resource Manager that was bought by dozens. ;^) -- "Where am I, and what am I doing in this handbasket?" Wes Peters Softweyr LLC wes@softweyr.com http://softweyr.com/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message