where was mention of what creates NUL files?

Eric Blake eblake@redhat.com
Fri Sep 17 18:02:00 GMT 2010

On 09/17/2010 11:12 AM, Daniel Barclay wrote:
> Does anyone recall a mention of what in CygWin (or possibly Emacs) creates
> files with a simple name of "NUL"?

Windows automagically maps the file named "NUL", in any directory, to 
the equivalent of Unix' /dev/null.  Cygwin doesn't create it, but all 
the same, portable programs should never name a file that 
case-insensitively matches 'nul', 'aux', or a host of other 
windows-magic names:


Meanwhile, cygwin 1.7 has added some magic to use native NT calls to 
work around these limitations, so that you can have a file that appears 
to be named "NUL" from within cygwin, but which is really exploiting 
some 16-bit values outside of Unicode.  But various windows programs 
that use windows API (rather than lower-level NT API), including your 
file Explorer, have a hard time figuring out what cygwin did.

Eric Blake   eblake@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

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