Doors provides a very fast (30 usec round trip) inherently threadedQuote:
>shortly, one of my scripts failed under Solaris 2.5 due to a strange
>looking file named
>which turned out to be of a newly introduced file type named door (see
>S_IFDOOR in /usr/include/sys/stat.h). The associated documentation is
>nearly non-existant (see door(2)) and just states that it is
>intentionally undocumented because it represents a new IPC mechanism
>which is subject to future changes (or to be removed). This mechanism
>is used at least for one new daemon named nscd which improves some name
>server lookups by caching it.
>Neither door(2) nor one of the other manual pages mention or document
>the new file type -- just /usr/include/sys/stat.h has a macro for it.
>Likewise, neither ls nor any other commands seem to honor this new
>The general questions are:
>- Why introducing now just another IPC mechanism, and
ipc mechanism. Doors were developed as part of Spring and have
been adapted to Solaris. In 2.6 the API has been changed and made
publicly usable. Note that a door call to a server causes the caller's
lwp to effectively begin execution in the server's address space
as a user level thread. This thread can retrieve the caller's
unix credentials, so it is possible to replace many setuid programs
with a doors-based daemon. The nscd uses this feature to serve
as it's own administration tool and secure allow only root to perform
The door is attached to a file via a fattach call. A door is notQuote:>- why creating a new file type?
a socket or a pipe or a directory or ..., so it gets a new type.
This argument would preclude us from ever introducing a new fileQuote:
>The latter breaks upward-compatibility for many tools (GNU-tar,
>for example, returns a non-zero exit status).
type... perhaps some of these tools should anticipate change and
assume that this will happen over time.
In 2.5 and 2.5.1, yes. Given the advantages of doors, I expectQuote:
>Further, following questions arise:
>- Are ncsd and /etc/.name_service_door the only instances of this
> new mechanism?
them to be used widely.
The nscd creates this file as needed at startup eg boot. It's justQuote:
>- Are ncsd or clients of ncsd able to create this file on their
> own if it is missing, or, if not, how to create such nodes,
> i.e. is mknod(2) able to do the job?
a regular empty file with a door "fattached" onto it...
"I wrote the nscd..."
Bart Smaalders Solaris Clustering SunSoft
http://playground.sun.com/~barts 2550 Garcia Ave
Mt View, CA 94043-1100