[Openmcl-devel] where is shell output stored when launching an external program?
clayton stanley
cstanley at cstanley.no-ip.biz
Mon Apr 16 18:00:45 PDT 2012
I am launching external processes with clozure common lisp. For better feedback/debugging, I would like to display the bash error string when I try to execute a nonexistent binary.
For example:
? (setf *t* (run-program "programDoesNotExist" '() :output t :error :output :wait nil))
#<EXTERNAL-PROCESS (programDoesNotExist)[919] (RUNNING) #x302000E6471D>
? *t*
#<EXTERNAL-PROCESS (programDoesNotExist)[919] (EXITED : 71) #x302000E6471D>
? (inspect *t*)
[0] #<EXTERNAL-PROCESS (programDoesNotExist)[919] (EXITED : 71) #x302000E6471D>
[1] Type: EXTERNAL-PROCESS
[2] Class: #<STRUCTURE-CLASS EXTERNAL-PROCESS>
[3] PID: 919
[4] %STATUS: :EXITED
[5] %EXIT-CODE: 71
[6] PTY: NIL
[7] INPUT: NIL
[8] OUTPUT: NIL
[9] ERROR: NIL
[10] STATUS-HOOK: NIL
[11] PLIST: NIL
[12] TOKEN: (0)
[13] CORE: NIL
[14] ARGS: ("programDoesNotExist")
[15] SIGNAL: #<SEMAPHORE #x302000E6483D>
[16] COMPLETED: #<SEMAPHORE #x302000E647BD>
[17] WATCHED-FDS: NIL
[18] WATCHED-STREAMS: NIL
[19] EXTERNAL-FORMAT: #<EXTERNAL-FORMAT NIL/:UNIX #x30200049FE9D>
Inspect>
Even with the inspector, I can't find the error information printed by the shell. I'm trying to recover this string in the lisp process:
$ programDoesNotExist
-bash: programDoesNotExist: command not found
Any help would be greatly appreciated.
Thanks,
-Clayton
More information about the Openmcl-devel
mailing list