From owner-freebsd-stable@FreeBSD.ORG Mon Feb 4 13:56:44 2008 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E9C8D16A41B; Mon, 4 Feb 2008 13:56:44 +0000 (UTC) (envelope-from marka@isc.org) Received: from drugs.dv.isc.org (drugs.dv.isc.org [IPv6:2001:470:1f00:820:214:22ff:fed9:fbdc]) by mx1.freebsd.org (Postfix) with ESMTP id 9C52A13C447; Mon, 4 Feb 2008 13:56:44 +0000 (UTC) (envelope-from marka@isc.org) Received: from drugs.dv.isc.org (localhost [127.0.0.1]) by drugs.dv.isc.org (8.14.2/8.14.1) with ESMTP id m14Dug8n075519; Tue, 5 Feb 2008 00:56:42 +1100 (EST) (envelope-from marka@drugs.dv.isc.org) Message-Id: <200802041356.m14Dug8n075519@drugs.dv.isc.org> To: Jeremy Chadwick From: Mark Andrews In-reply-to: Your message of "Mon, 04 Feb 2008 05:10:20 -0800." <20080204131020.GA5830@eos.sc1.parodius.com> Date: Tue, 05 Feb 2008 00:56:42 +1100 Sender: marka@isc.org Cc: FreeBSD Stable Mailing List , Ganbold , Eugene Grosbein Subject: Re: /dev/cuad0: Device busy X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Feb 2008 13:56:45 -0000 > On Mon, Feb 04, 2008 at 02:08:32PM +0700, Eugene Grosbein wrote: > > > Personally, I never understood the concept of "dial-in" and "call-out" > > > devices on FreeBSD. I ran BBS software for years on both Apple II > > > hardware and PC hardware; there was no distinction between such devices. > > > A serial port is a serial port. Chances are I'm not understanding why > > > there's a distinction, but there doesn't appear to be any explanation of > > > why there's a distinction within manpages or the handbook... > > > > The distinction exists to allow an application to wait on the "dial-in" > > port for incoming calls and another application to make outgoing call > > mean time using the same port as "call-out" while the port is idle. > > This is intruiging to me, because now I'm left wondering how that > actually works behind the scenes! :-) > > What happens when program X has /dev/ttyd0 open (for incoming calls), > receives a call, and then during which program Y attempts to open > /dev/cuad0? Does program Y indefinitely block/wait somewhere within the > kernel until program X releases the fd? open blocks until CD is asserted when /dev/cuad0 is not open. > If so, then I'm left wondering why Ganbold's cu -l cuad0 attempt > returned an immediate EBUSY, rather than blocking indefinitely. EBUSY indicates that the open on /dev/ttyd0 completed. > Also, the above mechanism must be fairly old, because I imagine it would > be more effective to utilise kqueue/kevent to inform said programs of > when the serial port is available for use. Only about 20 years old. > -- > | Jeremy Chadwick jdc at parodius.com | > | Parodius Networking http://www.parodius.com/ | > | UNIX Systems Administrator Mountain View, CA, USA | > | Making life hard for others since 1977. PGP: 4BD6C0CB | > > _______________________________________________ > freebsd-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org" -- Mark Andrews, ISC 1 Seymour St., Dundas Valley, NSW 2117, Australia PHONE: +61 2 9871 4742 INTERNET: Mark_Andrews@isc.org