1 ;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10; Package: UFFI -*-
2 ;;;; *************************************************************************
3 ;;;; FILE IDENTIFICATION
6 ;;;; Purpose: Operating system interface for UFFI
7 ;;;; Programmer: Kevin M. Rosenberg
8 ;;;; Date Started: Sep 2002
12 ;;;; This file, part of UFFI, is Copyright (c) 2002-2005 by Kevin M. Rosenberg.
14 ;;;; *************************************************************************
18 ;; modified from function ASDF -- Copyright Dan Barlow and Contributors
20 (defun run-shell-command (control-string &rest args &key output)
21 "Interpolate ARGS into CONTROL-STRING as if by FORMAT, and
22 synchronously execute the result using a Bourne-compatible shell, with
23 output to *trace-output*. Returns the shell's exit code."
25 (setq output *trace-output*))
27 (let ((command (apply #'format nil control-string args)))
29 (sb-impl::process-exit-code
33 :input nil :output output))
36 (ext:process-exit-code
40 :input nil :output output))
43 (excl:run-shell-command command :input nil :output output)
46 (system:call-system-showing-output
49 :output-stream output)
51 #+clisp ;XXX not exactly *trace-output*, I know
52 (ext:run-shell-command command :output :terminal :wait t)
56 (ccl:external-process-status
57 (ccl:run-program "/bin/sh" (list "-c" command)
58 :input nil :output output
61 #-(or openmcl clisp lispworks allegro scl cmu sbcl)
62 (error "RUN-SHELL-PROGRAM not implemented for this Lisp")