Date: Thu, 5 Jun 1997 11:16:12 +0300 (IDT) From: Eli Zaretskii To: "Peter J. Farley III" cc: djgpp AT delorie DOT com Subject: Re: /dev/null BASH bug? In-Reply-To: <33959285.2245069@news.dorsai.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Wed, 4 Jun 1997, Peter J. Farley III wrote: > OTOH, "h:/djgpp/nul" is a legal DOS "file", and is correctly handled > by the DJGPP libc routines A small inaccuracy: "h:/djgpp/nul" is NOT handled by the DJGPP libc at all. DOS itself knows about NUL (and all other devices that are loaded on your system at any given time) and creates an illusion that all the devices exist in every directory. DJGPP only handles the filenames like "x:/dev/null" and "x:/dev/tty" so that these Unix-style devices are trasnparently mapped into DOS "NUL" and "CON" devices (this saves gobs of #ifdef's in ported Unix programs). Libc also handles "x:/dev/device-name" specially because DOS behaves inconsistently for these names: some DOS functions succeed when `device-name' is a loaded device, but other functions fail. DJGPP tries to make all DOS functions work for these cases, by converting every such file spec to just "device-name" (except that "null" and "tty" are also converted as above). The converted names seem to work in more cases.