Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 07 Nov 2000 19:05:53 -0800
From:      Mike Smith <msmith@freebsd.org>
To:        bruno schwander <bschwand@dvart.com>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: close call in a device ? 
Message-ID:  <200011080305.eA835rF34155@mass.osd.bsdi.com>
In-Reply-To: Your message of "Tue, 07 Nov 2000 18:43:09 PST." <3A08BDBD.575A6AA4@dvart.com> 

next in thread | previous in thread | raw e-mail | index | archive | help

> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200011080305.eA835rF34155>