From owner-freebsd-hackers Sun Apr 11 0: 0:56 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from detlev.UUCP (tex-66.camalott.com [208.229.74.66]) by hub.freebsd.org (Postfix) with ESMTP id EE33514F4A for ; Sun, 11 Apr 1999 00:00:50 -0700 (PDT) (envelope-from joelh@gnu.org) Received: (from joelh@localhost) by detlev.UUCP (8.9.3/8.9.1) id BAA05165; Sun, 11 Apr 1999 01:57:11 -0500 (CDT) (envelope-from joelh) To: Leif Neland Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Baud rate of 0 References: From: Joel Ray Holveck Date: 11 Apr 1999 01:57:10 -0500 In-Reply-To: Leif Neland's message of "Sun, 11 Apr 1999 08:36:51 +0200 (CEST)" Message-ID: <86emlrzltl.fsf@detlev.UUCP> Lines: 36 X-Mailer: Gnus v5.5/Emacs 20.3 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG >> Why does setting the baud rate of a (wired tty) connection to 0 >> terminate it? When is this useful? > Why shouldn't it? > How else would you terminate it? As a program or a user? From a program's perspective, init uses revoke(2) to terminate it; this seems to be the most effective way. I'm not sure how revoke is implemented in the kernel, though; it may involve frobbing the baud rate at some point. If you're talking about doing this as a user, then I suppose that 'stty 0 < /dev/ttyS1' would do that, although is not really terribly general since it doesn't work on net connections. > Or rather, it is easier to do it this way, than to find pid's > running on that line, and kill 'em separately. Yes, that is true, although killing the process group leader seems to be generally effective as well. > I could think of many reasons for wanting to terminate a terminal > session. So can I. I just don't see why that would be a useful manner to do this. Cheers, joelh -- Joel Ray Holveck - joelh@gnu.org Fourth law of programming: Anything that can go wrong wi sendmail: segmentation violation - core dumped To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message