Date: 11 Apr 1999 01:57:10 -0500 From: Joel Ray Holveck <joelh@gnu.org> To: Leif Neland <leifn@neland.dk> Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Baud rate of 0 Message-ID: <86emlrzltl.fsf@detlev.UUCP> In-Reply-To: Leif Neland's message of "Sun, 11 Apr 1999 08:36:51 %2B0200 (CEST)" References: <Pine.BSF.4.05.9904110833350.99823-100000@arnold.neland.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
>> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86emlrzltl.fsf>