This is the mail archive of the
cygwin-patches@cygwin.com
mailing list for the Cygwin project.
Re: [Patch]: NUL and other special names
On Thu, 3 Jun 2004, Pierre A. Humblet wrote:
> David Fritz wrote:
>
> [snip]
> > Also, from the patch:
> >
> > /* COM and LPT must be followed by a single digit */
> >
> > The code in src/winsup/cygwin/devices.cc would seem to indicate that
> > the number is not limited to a single digit.
>
> From my tests that's the behavior on 9x, so it's appropriate code for
> managed mounts.
>
> Today on the list Igor indicated that PRN would soon regain its old
> behavior. My patch was more modest, just forbid using PRN (and creating
> a hard to delete file).
>
> Do we want to do what Igor suggested, although it's not Posix?
> Pierre
Well, if you intend to forbid the use of PRN, NUL, LPT*, COM*, etc, you
should probably modify the User's Guide section on DOS devices
<http://cygwin.com/cygwin-ug-net/using-specialnames.html#AEN796>, which
explicitly states that the previous behavior is allowed/expected.
IMO, either the names should be special DOS devices (and allow full
functionality), or they should be non-special names that are treated just
like any other files (e.g., allowing the "aux" directory, etc). The prior
choice follows the principle of least surprise; the latter may eliminate
the need for managed mounts (eventually).
Igor
--
http://cs.nyu.edu/~pechtcha/
|\ _,,,---,,_ pechtcha@cs.nyu.edu
ZZZzz /,`.-'`' -. ;-;;,_ igor@watson.ibm.com
|,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D.
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster." -- Patrick Naughton