[bulk] - R: /dev/ttys* under cygwin problem

Daniel Barclay daniel@fgm.com
Thu Sep 23 02:50:00 GMT 2010


Larry Hall (Cygwin) wrote:
> On 9/22/2010 1:29 PM, Daniel Barclay wrote:
>> Buchbinder, Barry (NIH/NIAID) [E] wrote:
>> ...
>>> To go there directly:
>>> http://www.cygwin.com/cygwin-ug-net/using-specialnames.html#pathnames-posixdevices
>>>
>>>
>>
>> Regarding where that page says:
>>
>> These devices cannot be seen with the command ls /dev/ ...
>>
>> I've wondered about that--why aren't those special files listed in a
>> directory listing?
>>
>> (The Cygwin DLL makes those device files appear when they are referred
>> to by full pathname; why doesn't it also make them appear in the
>> containing directory's listing?)
>
> They are implemented in a virtual file system. It is not necessary that
> there be placeholders in the file system for them to work.

But if they were emulated/simulated _consistently_, one could see which
devices were available by simply listing /dev instead of having to
re-find the documentation.

Again, why does Cygwin's (virtual) file system _not_ include those
devices (when listing /dev)?  (Why doesn't it do it more like Linux's
/proc, etc., which gives a consistent view and which tells you what's
available without your having to look elsewhere?)


Actually, is your last sentence above actually true?  Looking at the
device-creation script you pointed me to, I wonder:  How do you (e.g.,
a script) determine which devices of a given type exist (e.g., sda1,
sda2, sda3, ...)?  (Do you have to try to open each possible device and
check whether there's an error?)



> But if you
> prefer that, you can add them. This is why the documentation has a link
> to the script to create the devices in the file system:
>
> <http://cygwin.com/ml/cygwin/2004-03/txt00028.txt>

How do you keep things synchronized?  The script you pointed me to
appears to be over six years old.  I doubt that it matches the code
inside Cygwin 1.7.


Daniel



--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list