Subject: [clisp-list] Re: OPEN problem on Cygwin.

From: "Hoehle, Joerg-Cyril" <[email-masked]>
Date: Fri Apr 25 01:12:02 2003

Kaz Kylheku asks:

>On Cygwin, the /dev/tty file exists, but the directory /dev 
>does not. WE 
>  [1]> (with-open-file (x "/dev/tty"))
>  *** - nonexistent directory: #P"/dev/"
>Second-guessing the operating system's path component resolution
>strategy not only wastes cycles, but leads to incorrect guesses when
>the operating system recognizes special cases.

On the Amiga, CLISP has something like this.
E.g. (open "CON:////CLISP-Listener/AUTO/CLOSE/WAIT" :direction :io)
works, while CON: is not a file system at all -- IsFileSystem("CON:") -> false.
CLISP does not attempt to invoke the usual directory checks on such a thing. Same for named pipes on the Amiga, e.g. (open "PIPE:foo" :direction :output).

But the Amiga still has more legal names that CLISP would never let me access, e.g. "*", "CONSOLE:", "AUX:", "PRN:" (error empty :name in pathname).

CLISP also has special cases for /proc on UNIX AFAIK.

OTOH, in CL, you are bound to attempt to second-guess the OS'pathnames, otherwise MERGE-PATHNAMES, TRUENAME etc. cannot work or produce trusted results.

E.g. open "CONSOLE:" should work, despite empty name
     open Developer-CD#1:README should work
     open Developer-CD#1:libs/ should not work (directory, but empty name)
       even though some UNIX systems would let you read dirent structs from that.

Regards,
	Jorg Hohle.