[Openmcl-devel] `run-program' path search broken

Scott L. Burson Scott at sympoiesis.com
Sat Jun 2 11:52:42 PDT 2007


Hi Gary,

Well, the current documentation for RUN-PROGRAM says "The PATH  
environment variable is used to find programs whose name doesn't  
contain a directory component."  To me this entails that *DEFAULT- 
PATHNAME-DEFAULTS* is irrelevant for this purpose.  (I'm guessing  
that OpenMCL 1.0 indeed ignored it, or the bug I ran into would have  
been found sooner.)  So I would say, if anyone is doing this,

> (let* ((*default-pathname-defaults* #p"/usr/local/bin/"))
>   ...
>   (run-program "ls" ...))

that the documentation doesn't endorse this usage.

On Jun 2, 2007, at 12:27 AM, Gary Byers wrote:

> My first reaction was to suggest that RUN-PROGRAM's first argument
> be changed from "a string or pathname ..." to "a string ... used
> in combination with the value of PATH to identify an executable file".
> That might be a little too restrictive, and it might be better to
> just say that 'any translation of the program argument into something
> that the OS can use takes place as if *DEFAULT-PATHNAME-DEFAULTS*
> was bound to #p""'.

Hmm, I don't get the difference, but maybe it doesn't matter.  I  
agree that adding some clarification to the doc wouldn't hurt.

> The MERGE-PATHNAMES that currently happens during "translation to
> something that the OS can use" isn't entirely intentional

Yes, I see, you're trying to have a standard way of handling pathname  
arguments, but this seems to be a special case that doesn't fit that  
system.  Here, to save you the trouble, is a possible fix.

-- Scott

-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch-run-program-2007-06-02
Type: application/octet-stream
Size: 1567 bytes
Desc: not available
URL: <https://lists.clozure.com/pipermail/openmcl-devel/attachments/20070602/f451d5b1/attachment.obj>
-------------- next part --------------



More information about the Openmcl-devel mailing list