From 154f69e22d41ff945343a84e7fd80e1121e6afb3 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Sun, 31 Jan 1999 20:46:25 +0000 Subject: [PATCH] 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. --- v7/src/runtime/syncproc.scm | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) 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) -- 2.25.1