Subject: [clisp-list] Re:[clisp-list]Q: problem with run-programm in Win32 (:indirectp documentation, :wait & %s in message)

From: "Hoehle, Joerg-Cyril" <[email-masked]>
Date: Thu Feb 21 01:52:06 2002

BTW, there's some unrelated bug showing, and some lack of documentation:

lin8080 [Stefan] reports:
> [1]>  (shell "dir")
> [pathname.d:11395]
> *** - Win32 error 2 (ERROR_FILE_NIT_FOUND): The system cannot find the
                                  ^^^ is that really copy&paste??
> file specified.
> 1. Break [2]> 

Tara C. Matise reports:
> [6]>(run-program "lispcri.exe") 
> [%s:10790] 
> *** - Win32 error 2 (ERROR_FILE_NOT_FOUND): The system cannot find the file specified. 

Why does one see [%s: 10790] and somebody else [pathname.d:11395]?
I also see [%s:nnn] on my system, cf. Bugtracker
http://sourceforge.net/tracker/index.php?func=detail&aid=514741&group_id=1355&atid=101355

> [7]> (run-program "dir" :indirect t)

Good to know that shell internal programs can be run as well.
Where is the CLISP FAQ? :-)

> [5]> (run-program "dir" :indirect t)
> 
> *** -  EVAL/APPLY: keyword :INDIRECT is illegal for #<COMPILED-CLOSURE
> RUN-PROGRAM.  The possible keywords are (:ARGUMENTS :INPUT :OUTPUT
> :IF-OUTPUT-EXISTS :INDIRECTP)   

:INDIRECTP (WINDOWS only) is not documented in http://clisp.cons.org/impnotes.html
Neither are :WAIT or :MAY-EXEC (the latter is UNIX only)
BTW, does :WAIT really work on MS-Windows?? The code appends a " &" after the command, something I only know from UNIX shells. Is there a few #+UNIX missing in runprog.lisp?

What does indirectp mean to the user?
cmd.exe /? says:
/C      Führt den Befehl in der Zeichenfolge aus und endet dann.
~ "Execute command in string and end." What's indirect about that?
It seems to be the equivalent of UNIX /bin/[[t]c]sh -c
Shouldn't that be the default for something called "run-SHELL-command"?

> [8]> (execute "editor.exe")
> opens the Editor.exe in a new window. wow.
But isn't CLISP stopped until this program terminates?

(ext:run-program "notepad.exe" :wait nil)
Notepad says: "The file "&.txt" could not be found. Create a new document?
And the CLISP prompt only returns when I close notepad.

I'm using the CLISP-2.27-win32 binary distribution on a MS-W*2k system.

Regards,
	Jörg Höhle.

---

From: Sam Steingold <[email-masked]>
Date: Thu Feb 21 09:14:21 2002

> * In message <DFD875E85664D3118FA6080006277DE704F0564A@U8PN2>
> * On the subject of "[clisp-list] Re:[clisp-list]Q: problem with run-programm in Win32 (:indirectp documentation, :wait & %s in message)"
> * Sent on Thu, 21 Feb 2002 10:05:01 +0100
> * Honorable "Hoehle, Joerg-Cyril" <[email-masked]> writes:
>

this was a bug, fixed on 2001-12-20 by Arseny Slobodjuck

> Good to know that shell internal programs can be run as well.

this is now documented in the impnotes and will be available with the
next release.

> Where is the CLISP FAQ? :-)

not yet -- any volunteers?
the FAQ should be a map "question --> impnotes reference".
it should be written in XHTML.

> BTW, does :WAIT really work on MS-Windows?? The code appends a " &"
> after the command, something I only know from UNIX shells. Is there a
> few #+UNIX missing in runprog.lisp?

you can use bash on win32 too.
(setenv COMSPEC)

> Shouldn't that be the default for something called "run-SHELL-command"?

on win32, CLISP does _not_ start a shell to execute something, by
default.
i.e., SHELL does not necessarily invoke COMSPEC.
the _semantics_ of SHELL is the same on all platforms,
but the _implementation_ is different.

> I'm using the CLISP-2.27-win32 binary distribution on a MS-W*2k system.

this is very old.
we _are_ overdue for a release.

-- 
Sam Steingold (http://www.podval.org/~sds) running RedHat7.2 GNU/Linux
Keep Jerusalem united! <http://www.onejerusalem.org/Petition.asp>
Read, think and remember! <http://www.iris.org.il> <http://www.memri.org/>
PI seconds is a nanocentury