cmucl: run-program broken with relative path
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ASDF |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
I'll look at sbcl 1.3.20, ccl 1.11, and cmucl 21b, and have each one call `sh -c "echo hi"` in two ways (with asdf 3.2.1). First, here's what works (an absolute path)
% sbcl --eval "(require :asdf)" --eval "(uiop:run-program '(\"/bin/sh\" \"-c\" \"echo hi\"))" --eval "(quit)"; echo $?
[...]
0
% ccl --eval "(require :asdf)" --eval "(uiop:run-program '(\"/bin/sh\" \"-c\" \"echo hi\"))" --eval "(quit)"; echo $?
0
% cmucl -eval "(require :asdf)" -eval "(uiop:run-program '(\"/bin/sh\" \"-c\" \"echo hi\"))" -eval "(quit)"; echo $?
[...]
0
%
But this does not work:
% ln -sf /bin/sh mysh
% sbcl --eval "(require :asdf)" --eval "(uiop:run-program '(\"./mysh\" \"-c\" \"echo hi\"))" --eval "(quit)"; echo $?
[...]
0
% ccl --eval "(require :asdf)" --eval "(uiop:run-program '(\"./mysh\" \"-c\" \"echo hi\"))" --eval "(quit)"; echo $?
0
% cmucl -eval "(require :asdf)" -eval "(uiop:run-program '(\"./mysh\" \"-c\" \"echo hi\"))" -eval "(quit)"; echo $?
[...]
Error in function RUN-PROGRAM: No such program: "./mysh"
[Condition of type SIMPLE-ERROR]
Restarts:
0: [ABORT] Skip remaining initializations.
Debug (type H for help)
(RUN-PROGRAM "./mysh" ("./mysh" "-c" "echo hi") :ENV NIL ...)
Source: Error finding source:
Error in function DEBUG::
target:
0]
Issue persists (on cmu-21b_ _21b_unicode_ -linux- x86):
Session 1
* (load "../asdf/ build/asdf. lisp")
[..]
* (asdf:implement ation-identifie r)
"cmu-21b_ _21b_unicode_ -linux- x86" program '("/bin/ls" ".") :output :interactive))
* (uiop:wait-process (uiop:launch-
ls_copy ls_link
0 program '("ls" ".") :output :interactive))
* (uiop:wait-process (uiop:launch-
ls_copy ls_link
* (uiop:wait-process (uiop:launch- program '("ls_copy" ".") :output :interactive))
Error in function RUN-PROGRAM: No such program: "ls_copy"
[Condition of type SIMPLE-ERROR]
Restarts:
0: [ABORT] Return to Top-Level.
Debug (type H for help)
(RUN-PROGRAM "ls_copy" ("ls_copy" ".") :ENV NIL ...) GET-FILE- TOP-LEVEL- FORM: Source file no longer exists: code/run- program. lisp.
Source: Error finding source:
Error in function DEBUG::
target:
0] 0
* (uiop:wait-process (uiop:launch- program '("./ls_copy" ".") :output :interactive))
Error in function RUN-PROGRAM: No such program: "./ls_copy"
[Condition of type SIMPLE-ERROR]
Restarts:
0: [ABORT] Return to Top-Level.
Debug (type H for help)
(RUN-PROGRAM "./ls_copy" ("./ls_copy" ".") :ENV NIL ...) GET-FILE- TOP-LEVEL- FORM: Source file no longer exists: code/run- program. lisp.
Source: Error finding source:
Error in function DEBUG::
target:
0] 0
*
Session 2 ======= ======= ======= ======= ======= ======= ======= ======= ======= ======= ======= =======
=======
* (load "../asdf/ build/asdf. lisp")
[..]
* (asdf:implement ation-identifie r)
"sbcl-1. 3.21-linux- x64" program '("/bin/ls" ".") :output :interactive))
* (uiop:wait-process (uiop:launch-
ls_copy ls_link
0 program '("ls" ".") :output :interactive))
* (uiop:wait-process (uiop:launch-
ls_copy ls_link
0 program '("ls_copy" ".") :output :interactive))
* (uiop:wait-process (uiop:launch-
debugger invoked on a SIMPLE-ERROR in thread
#<THREAD "main thread" RUNNING {100197EA03}>:
Couldn't execute "ls_copy": No such file or directory
Type HELP for debugger help, or (SB-EXT:EXIT) to exit from SBCL.
restarts (invokable by number or by possibly- abbreviated name):
0: [ABORT] Exit debugger, returning to top level.
(RUN-PROGRAM "ls_copy" (".") :ENV NIL :ENVIRONMENT NIL :WAIT NIL :SEARCH T :PTY NIL :INPUT NIL :IF-INPUT- DOES-NOT- EXIST :ERROR :OUTPUT T :IF-OUTPUT-EXISTS :APPEND :ERROR NIL :IF-ERROR-EXISTS :APPEND :STATUS-HOOK NIL :EXTERNAL-FORMAT :UTF-8 :DIRECTORY NIL)
0] 0
* (uiop:wait-process (uiop:launch- program '("./ls_copy" ".") :output :interactive))
ls_copy ls_link
0
*