Accessing native NT namespace as filesystem

Corinna Vinschen
Thu Sep 2 17:10:00 GMT 2010

On Sep  2 12:36, Christopher Faylor wrote:
> On Thu, Sep 02, 2010 at 10:30:06AM -0600, Eric Blake wrote:
> >On 09/02/2010 10:19 AM, Corinna Vinschen wrote:
> >> Hi guys,
> >>
> >> So, what do you think?  Useful/Useless/Tasteless/Ridiculous?
> >
> >Cool!  And probably useful.
> >
> >> Would /sys be ok?  Or what else?  Not /dev, certainly, since that's
> >> reserved for Cygwin/POSIX devices.  /devices, maybe, as on Solaris?
> >
> >/proc/sys, to match /proc/registry?  Otherwise, I like /devices more 
> >than /sys, since /sys on Linux tends to be more introspective of kernel 
> >options than exposing an alternate namespace for file systesm.

Oh, accessing filesystems or devices in general is just a small part of
what the NT namespace is about.  It's certainly not exactly sysfs.  But
it's a virtual filesystem which consists of any kind of object which has
been created in the OS.  There's the "BaseNamedObjects" dir which keeps
events, mutexes, semaphores etc.  There's the "Driver" dir which keeps a
list of all drivers loaded into the system, kind of `lsmod'-like.  Or
"Sessions" which keeps the list of all sessions running on the system
and all local objects created within the sessions.

> I was thinking /proc/something too since, if you made it /sys, you would
> very likely impact people who have sys directories in their root.
> Either that or just make it a mountable filesystem type which can be
> mounted anywhere.  I think I like that better.  I wish we could do that
> with /proc too.

We could still do that.  We just define predefined filesystem types
"proc" and "sysfs" or "devices" (or "udev" ;)) for the mount table, just
as "cygdrive" today.  But I'm not sure it makes a lot of sense, at
least for proc.  Who would really like to have the proc FS not in /proc?

I tend to like the idea to hide the native NT FS in /proc.  /proc/sys
has a nice sound.  On second thought, /devices or /proc/devices doesn't
really fly:



Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

More information about the Cygwin-developers mailing list