1 (in-package #:trivial-shell
)
3 (defun %shell-command
(command input
)
4 (let* ((process (ext:run-program
5 *bourne-compatible-shell
*
7 :input input
:output
:stream
:error
:stream
))
8 (output (file-to-string-as-lines (ext::process-output process
)))
9 (error (file-to-string-as-lines (ext::process-error process
))))
10 (close (ext::process-output process
))
11 (close (ext::process-error process
))
16 (ext::process-exit-code process
))))
18 (defun %os-process-id
()
19 (error 'unsupported-function-error
:function
'os-process-id
))
21 (defun %get-env-var
(name)
22 (cdr (assoc (intern (substitute #\_
#\- name
)
24 ext
:*environment-list
*)))
28 (error "CMUCL does not support exit codes."))