Date: Tue, 6 Oct 1998 14:30:10 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: M DOT A DOT Bukin AT inp DOT nsk DOT su cc: djgpp AT delorie DOT com Subject: Re: /dev/null problems with bash when rebuild from sources In-Reply-To: <20u31k5tgb.fsf@Sky.inp.nsk.su> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com On 4 Oct 1998 M DOT A DOT Bukin AT inp DOT nsk DOT su wrote: > djgpp 20:29:42> /bin/echo test > bash: /bin/echo: No such file or directory (ENOENT) This is expected (and correct) behavior: Bash is not supposed to pretend that /bin/echo exists if it doesn't. The "/bin/sh" as the first line of a shell script and in Makefiles is supported *only* when you run the script or the Makefile. > djgpp 20:30:51> SYSROOT=$DJDIR > 20:31:01> echo $SYSROOT > d:/comp/djgpp > 20:31:07> echo test > /dev/null > bash: /dev/null: No such file or directory (ENOENT) You are NOT supposed to set SYSROOT to anything but a root of a certain drive. That is, SYSROOT=c: is okay (and /dev/null will work then). DJGPP only supports /dev/null if /dev is at the top level, either as /dev/null or X:/dev/null (where X: is any drive letter). In the case above, the library sees d:/comp/djgpp/dev/null, since Bash prepends $SYSROOT before it calls any library functions, and that name does not get mapped into NUL. I don't think it is right for the library to handle such cases, since that would make `dev' special and will essentially preclude any directory to have such name. Right now, you can have `dev' anywhere but at the top level, which is already bad enough, IMHO (several people got burnt by that, and it is now in the FAQ).