From 2e98d02e2b535ddad36098f6fc40c8d7beb9fee0 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Sun, 31 Jan 1999 20:43:21 +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/runtime.pkg | 5 ++--- v7/src/runtime/syncproc.scm | 24 ++++++++++-------------- v8/src/runtime/runtime.pkg | 5 ++--- 3 files changed, 14 insertions(+), 20 deletions(-) diff --git a/v7/src/runtime/runtime.pkg b/v7/src/runtime/runtime.pkg index 78f4789a0..2daf6a1cc 100644 --- a/v7/src/runtime/runtime.pkg +++ b/v7/src/runtime/runtime.pkg @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: runtime.pkg,v 14.301 1999/01/29 22:46:34 cph Exp $ +$Id: runtime.pkg,v 14.302 1999/01/31 20:42:20 cph Exp $ Copyright (c) 1988-1999 Massachusetts Institute of Technology @@ -2332,9 +2332,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. condition-type:subprocess-exited condition-type:subprocess-signalled condition-type:subprocess-stopped - make-subprocess-context run-shell-command - run-synchronous-process)) + run-synchronous-subprocess)) (define-package (runtime graphics) (files "graphics") diff --git a/v7/src/runtime/syncproc.scm b/v7/src/runtime/syncproc.scm index bcd241eec..c12c25240 100644 --- a/v7/src/runtime/syncproc.scm +++ b/v7/src/runtime/syncproc.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: syncproc.scm,v 1.2 1999/01/29 22:58:29 cph Exp $ +$Id: syncproc.scm,v 1.3 1999/01/31 20:43:21 cph Exp $ Copyright (c) 1999 Massachusetts Institute of Technology @@ -24,6 +24,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. (declare (usual-integrations)) +(load-option 'SUBPROCESS) + (define-structure (subprocess-context (keyword-constructor make-subprocess-context) (conc-name subprocess-context/)) @@ -52,20 +54,14 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ;; The name of the shell interpreter. (shell-file-name (os/shell-file-name) read-only #t)) -(define (run-shell-command command #!optional context) - (let ((context - (if (or (default-object? context) (not context)) - (make-subprocess-context) - context))) - (run-synchronous-process (subprocess-context/shell-file-name context) - (os/form-shell-command command) - context))) +(define (run-shell-command command . options) + (apply run-synchronous-subprocess + (subprocess-context/shell-file-name context) + (os/form-shell-command command) + options)) -(define (run-synchronous-process program arguments #!optional context) - (let* ((context - (if (or (default-object? context) (not context)) - (make-subprocess-context) - context)) +(define (run-synchronous-subprocess program arguments . options) + (let* ((context (apply make-subprocess-context options)) (directory (subprocess-context/working-directory context)) (process #f)) (bind-condition-handler '() diff --git a/v8/src/runtime/runtime.pkg b/v8/src/runtime/runtime.pkg index 074f42059..7a990555f 100644 --- a/v8/src/runtime/runtime.pkg +++ b/v8/src/runtime/runtime.pkg @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: runtime.pkg,v 14.307 1999/01/29 22:46:26 cph Exp $ +$Id: runtime.pkg,v 14.308 1999/01/31 20:42:27 cph Exp $ Copyright (c) 1988-1999 Massachusetts Institute of Technology @@ -2336,9 +2336,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. condition-type:subprocess-exited condition-type:subprocess-signalled condition-type:subprocess-stopped - make-subprocess-context run-shell-command - run-synchronous-process)) + run-synchronous-subprocess)) (define-package (runtime graphics) (files "graphics") -- 2.25.1