Subject: [clisp-list] Starting CLisp with CreateProcess on Windows

From: Norbert Lehmann <[email-masked]>
Date: Mon Jun 16 09:24:01 2003

Hello

on Windows 2000, I am trying to create a CLisp process using the system
command "CreateProcess". If I start with CreateProcess" only the executable "lisp.exe" (thus, without the memory file "lispinit.mem"), everything is
fine, CLisp starts up and I can type something on the prompt which appears.

However, if I want to start CLisp with CreateProcess together with the
memory image "lispinit.mem" using the command line option "-M", then
there is a problem: From the task manager, I can see that a process
"lisp.exe" was created, however, it seems as if this process is
hanging somewhere. At least, there is no prompt and no read-eval-print-loop
where I could evaluate lisp expressions.

To make things clearer: executing

   lisp.exe -M lispinit.mem

from a console on Windows 2000 is always fine, however, executing the same
sequence using the system call "CreateProcess" starts a process "lisp.exe"
(can be seen from the Task Manager). However, this process seems to
hang somewhere.

Has anybody else already seen a similar behaviour? Or has anybody an
idea on how to resolve this problem? Finally, I would like to be abel to
start CLisp on Windows 2000 together with some additional code I have
written.

Thank you + have a nice day
Norbert

-- 
                                 \|/
                                (o o)
+---------------------------oOO--(_)--OOo---------------------------+
Norbert Lehmann
Department of Informatics (DIUF)            phone: ++ 41 26 300 83 30
University of Fribourg                        fax: ++ 41 26 300 97 26
Rue Faucigny 2                       e-mail: [email-masked]
CH-1700 Fribourg                    http://www-iiuf.unifr.ch/~lehmann
Switzerland
+-------------------------------------------------------------------+
                              (_)   (_)

---

From: Sam Steingold <[email-masked]>
Date: Mon Jun 16 09:52:18 2003

> * In message <p05111b03bb139a9aa461@[134.21.9.36]>
> * On the subject of "[clisp-list] Starting CLisp with CreateProcess on Windows"
> * Sent on Mon, 16 Jun 2003 18:23:02 +0200
> * Honorable Norbert Lehmann <[email-masked]> writes:
>
> on Windows 2000, I am trying to create a CLisp process using the
> system command "CreateProcess". If I start with CreateProcess" only
> the executable "lisp.exe" (thus, without the memory file
> "lispinit.mem"), everything is fine, CLisp starts up and I can type
> something on the prompt which appears.
> 
> hanging somewhere. At least, there is no prompt and no
> read-eval-print-loop where I could evaluate lisp expressions.

CLISP uses CreateProcess for EXT:SHELL and EXT::LAUNCH and both start
CLISP just fine:

[7]> (EXT::LAUNCH "d:/gnu/clisp/current/build-g-mingw/lisp.exe" :ARGUMENTS
'("-norc" "-q" "-M" "d:/gnu/clisp/current/build-g-mingw/lispinit.mem"))
Reserved address range 0x19d90000-0x5fffffff .
STACK depth: 16363

[1]> (quit)
0
[8]> (quit)
Bye.

[1]> (shell "d:/gnu/clisp/current/build-g-mingw/lisp.exe -M d:/gnu/clisp/current
/build-g-mingw/lispinit.mem")
Reserved address range 0x19d90000-0x5fffffff .
STACK depth: 16363
  i i i i i i i       ooooo    o        ooooooo   ooooo   ooooo
  I I I I I I I      8     8   8           8     8     o  8    8
  I  \ `+' /  I      8         8           8     8        8    8
   \  `-+-'  /       8         8           8      ooooo   8oooo
    `-__|__-'        8         8           8           8  8
        |            8     o   8           8     o     8  8
  ------+------       ooooo    8oooooo  ooo8ooo   ooooo   8

Copyright (c) Bruno Haible, Michael Stoll 1992, 1993
Copyright (c) Bruno Haible, Marcus Daniels 1994-1997
Copyright (c) Bruno Haible, Pierpaolo Bernardi, Sam Steingold 1998
Copyright (c) Bruno Haible, Sam Steingold 1999-2003

;; Loading file D:\sds\_clisprc ...
;;  Loading file D:\sds\lisp\init.fas ...
;;   Loading file D:\gnu\clocc\clocc.fas ...
;;   Loaded file D:\gnu\clocc\clocc.fas
;;   Loading file D:\gnu\clocc\src\cllib\base.fas ...
;;    Loading file D:\gnu\clocc\src\port\ext.fas ...
;;    Loaded file D:\gnu\clocc\src\port\ext.fas
;;    Loading file D:\gnu\clocc\src\port\sys.fas ...
;;     Loading file D:\gnu\clocc\src\port\path.fas ...
;;     Loaded file D:\gnu\clocc\src\port\path.fas
;;    Loaded file D:\gnu\clocc\src\port\sys.fas
;;   Loaded file D:\gnu\clocc\src\cllib\base.fas
;;   Loading file D:\gnu\clocc\src\cllib\auto.fas ...
;;   Loaded file D:\gnu\clocc\src\cllib\auto.fas
;;  Loaded file D:\sds\lisp\init.fas
;; Loaded file D:\sds\_clisprc
[1]> (quit)
Bye.
t
[2]> (quit)
Bye.

can it be that you are not passing some arguments, like stdio, to
CreateProcess?

at any rate, I am pretty sure this is a good question for a win32 newsgroup.

-- 
Sam Steingold (http://www.podval.org/~sds) running RedHat9 GNU/Linux
<http://www.camera.org> <http://www.iris.org.il> <http://www.memri.org/>
<http://www.mideasttruth.com/> <http://www.palestine-central.com/links.html>
Stupidity, like virtue, is its own reward.