From: Chris Hanson Date: Sun, 31 Jan 1999 20:46:25 +0000 (+0000) Subject: Change name: RUN-SYNCHRONOUS-PROCESS to RUN-SYNCHRONOUS-SUBPROCESS. X-Git-Tag: 20090517-FFI~4657 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=154f69e22d41ff945343a84e7fd80e1121e6afb3;p=mit-scheme.git Change name: RUN-SYNCHRONOUS-PROCESS to RUN-SYNCHRONOUS-SUBPROCESS. Change calling convention of RUN-SYNCHRONOUS-SUBPROCESS and RUN-SHELL-COMMAND to accept keyword arguments, and eliminate MAKE-SUBPROCESS-CONTEXT. --- diff --git a/v7/src/runtime/syncproc.scm b/v7/src/runtime/syncproc.scm index c12c25240..7fad65198 100644 --- a/v7/src/runtime/syncproc.scm +++ b/v7/src/runtime/syncproc.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: syncproc.scm,v 1.3 1999/01/31 20:43:21 cph Exp $ +$Id: syncproc.scm,v 1.4 1999/01/31 20:46:25 cph Exp $ Copyright (c) 1999 Massachusetts Institute of Technology @@ -23,9 +23,9 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ;;; package: (runtime synchronous-subprocess) (declare (usual-integrations)) - -(load-option 'SUBPROCESS) +(load-option 'SUBPROCESS) + (define-structure (subprocess-context (keyword-constructor make-subprocess-context) (conc-name subprocess-context/)) @@ -55,14 +55,17 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (shell-file-name (os/shell-file-name) read-only #t)) (define (run-shell-command command . options) - (apply run-synchronous-subprocess - (subprocess-context/shell-file-name context) - (os/form-shell-command command) - options)) - + (let ((context (apply make-subprocess-context options))) + (run-synchronous-subprocess-1 (subprocess-context/shell-file-name context) + (os/form-shell-command command) + context))) + (define (run-synchronous-subprocess program arguments . options) - (let* ((context (apply make-subprocess-context options)) - (directory (subprocess-context/working-directory context)) + (run-synchronous-process-1 program arguments + (apply make-subprocess-context options))) + +(define (run-synchronous-subprocess-1 program arguments context) + (let* ((directory (subprocess-context/working-directory context)) (process #f)) (bind-condition-handler '() (lambda (condition)