From owner-freebsd-hackers Tue Nov 7 19: 1: 4 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from mass.osd.bsdi.com (adsl-63-206-90-77.dsl.snfc21.pacbell.net [63.206.90.77]) by hub.freebsd.org (Postfix) with ESMTP id 80EE037B479 for ; Tue, 7 Nov 2000 19:01:01 -0800 (PST) Received: from mass.osd.bsdi.com (localhost [127.0.0.1]) by mass.osd.bsdi.com (8.11.0/8.11.1) with ESMTP id eA835rF34155; Tue, 7 Nov 2000 19:05:56 -0800 (PST) (envelope-from msmith@mass.osd.bsdi.com) Message-Id: <200011080305.eA835rF34155@mass.osd.bsdi.com> X-Mailer: exmh version 2.1.1 10/15/1999 To: bruno schwander Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: close call in a device ? In-reply-to: Your message of "Tue, 07 Nov 2000 18:43:09 PST." <3A08BDBD.575A6AA4@dvart.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 07 Nov 2000 19:05:53 -0800 From: Mike Smith Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > The reason I am doing this, is precisely because I need to virtualize > accesses from several processes to _one_ _predefined_ device. I have no > control over that device name from the client process point of view, so I > can not have multiple devices. I pretty much need to be able to lie to > the process, telling it that it has full control of the device it wants, > and actually allow other processes to open and use the device in the same > way at the same time. If I understand you correctly, you have multiple processes all of which are going to try to open /dev/foo, and you want them to behave as though they have each opened a unique device? You can't do this with FreeBSD, or with many other Unixes. Arguably, this is a defect with the device model. If you are trying to fake up concurrent access to a device, and the client processes are only going to read and write (no ioctls) to this device, then you can use a fifo and a multiplexor process. Alternatively, and this would be recommended; fix the client program. -- ... every activity meets with opposition, everyone who acts has his rivals and unfortunately opponents also. But not because people want to be opponents, rather because the tasks and relationships force people to take different points of view. [Dr. Fritz Todt] V I C T O R Y N O T V E N G E A N C E To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message