delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/06/05/04:19:21

Date: Thu, 5 Jun 1997 11:16:12 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: "Peter J. Farley III" <pjfarley AT dorsai DOT org>
cc: djgpp AT delorie DOT com
Subject: Re: /dev/null BASH bug?
In-Reply-To: <33959285.2245069@news.dorsai.org>
Message-ID: <Pine.SUN.3.91.970605111547.5841M-100000@is>
MIME-Version: 1.0

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.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019