From owner-freebsd-hackers Mon Oct 30 13:14:47 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from smtpproxy1.mitre.org (mb-20-100.mitre.org [129.83.20.100]) by hub.freebsd.org (Postfix) with ESMTP id 9D29D37B4C5 for ; Mon, 30 Oct 2000 13:14:39 -0800 (PST) Received: from avsrv1.mitre.org (avsrv1.mitre.org [129.83.20.58]) by smtpproxy1.mitre.org (8.9.3/8.9.3) with ESMTP id QAA12354 for ; Mon, 30 Oct 2000 16:14:32 -0500 (EST) Received: from mailsrv2.mitre.org (mailsrv2.mitre.org [129.83.221.17]) by smtpsrv1.mitre.org (8.9.3/8.9.3) with ESMTP id QAA23477 for ; Mon, 30 Oct 2000 16:14:31 -0500 (EST) Received: from mitre.org ([128.29.145.140]) by mailsrv2.mitre.org (Netscape Messaging Server 4.15) with ESMTP id G39HO600.REX; Mon, 30 Oct 2000 16:14:30 -0500 Message-ID: <39FDE4D7.1020C4B2@mitre.org> Date: Mon, 30 Oct 2000 16:15:03 -0500 From: "Andresen,Jason R." Organization: The MITRE Corporation X-Mailer: Mozilla 4.75 [en]C-20000818M (Win98; U) 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. > > And it is certainly foolproof from the point of view that there's no way > in hell for the session not to be terminated, unlike some ps garbage I've > seen. Unfortunatly, sometimes when processes suddenly lose stdin/stdout, they jump into infinate loops and start eating cpu cycles like crazy. I'd hate to see what happens when you kill off a significant number of people running these poorly behaved programs. FVWM95 Taskbars used to be notorious for this, I remember seeing upwards of a dozen of them vying for CPU time on some lab machines. -- _ _ _ ___ ____ ___ ______________________________________ / \/ \ | ||_ _|| _ \|___| | Jason Andresen -- jandrese@mitre.org / /\/\ \ | | | | | |/ /|_|_ | Views expressed may not reflect those /_/ \_\|_| |_| |_|\_\|___| | of the Mitre Corporation. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message