Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 08 Oct 2001 12:52:16 +0200
From:      Poul-Henning Kamp <phk@critter.freebsd.dk>
To:        Doug Rabson <dfr@nlsystems.com>
Cc:        Peter Wemm <peter@wemm.org>, Brian Somers <brian@Awfulhak.org>, freebsd-arch@FreeBSD.ORG
Subject:   Re: Cloned open support 
Message-ID:  <59657.1002538336@critter.freebsd.dk>
In-Reply-To: Your message of "Mon, 08 Oct 2001 09:19:49 BST." <20011008091835.X530-100000@salmon.nlsystems.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
In message <20011008091835.X530-100000@salmon.nlsystems.com>, Doug Rabson write
s:
>On Mon, 8 Oct 2001, Poul-Henning Kamp wrote:
>
>> >Doug mentions the hack in dev/streams/streams.c:
>> >        td->td_dupfd = fd;
>> >        return ENXIO;
>> >.. this is nasty. :-)
>>
>> This is abuse, it should be rewritten.
>>
>> >I think the SVR4 clone driver uses something like this.  It causes the
>> >original namei / open attempt to fail (thus releasing the "common" vnode)
>> >and then switching over to the *real* file/vnode at the last minute.
>>
>> We would have to do that as well in order to unwind the committed vnode
>> and select another.
>
>It might be abuse but its the only way that I know of to keep track of
>data per-open-file.

I looked at it closer and actually that is a very interesting case:
you open a device and return a socket.  I don't think this can be
done any other way than it is done now.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk@FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




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