From 559110fdf6a7fc11786effa043a78c62c977985e Mon Sep 17 00:00:00 2001 From: "Taylor R. Campbell" Date: Sat, 16 Aug 2008 17:57:11 +0000 Subject: [PATCH] Revert previous change to close I/O ports of subprocesses when they exit. --- v7/src/runtime/process.scm | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/v7/src/runtime/process.scm b/v7/src/runtime/process.scm index 3bcb38b4d..436aa2068 100644 --- a/v7/src/runtime/process.scm +++ b/v7/src/runtime/process.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: process.scm,v 1.36 2008/02/11 07:23:21 cph Exp $ +$Id: process.scm,v 1.37 2008/08/16 17:57:11 riastradh Exp $ Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, @@ -104,15 +104,12 @@ USA. (and (output-port? port) port))) -(define (close-subprocess-i/o process #!optional close-port-too?) - (without-interrupts - (lambda () - (%close-subprocess-i/o process close-port-too?)))) +(define (close-subprocess-i/o process) + (without-interrupts (lambda () (%close-subprocess-i/o process)))) -(define (%close-subprocess-i/o process close-port-too?) +(define (%close-subprocess-i/o process) ;; Assumes that interrupts are locked. - (cond ((and close-port-too? - (subprocess-%i/o-port process)) + (cond ((subprocess-%i/o-port process) => (lambda (port) (set-subprocess-%i/o-port! process #f) (set-subprocess-input-channel! process #f) @@ -192,7 +189,7 @@ USA. (if (subprocess-index process) (begin (remove-from-gc-finalizer! subprocess-finalizer process) - (%close-subprocess-i/o process #t)))))) + (%close-subprocess-i/o process)))))) (define (subprocess-status process) (convert-subprocess-status (%subprocess-status process))) @@ -264,10 +261,11 @@ USA. (else (error "Illegal process job-control status:" n))))) (define (handle-subprocess-status-change) - (for-each (lambda (process) - (if (memq (subprocess-status process) '(EXITED SIGNALLED)) - (close-subprocess-i/o process #f))) - (subprocess-list))) + (if (eq? 'NT microcode-id/operating-system) + (for-each (lambda (process) + (if (memq (subprocess-status process) '(EXITED SIGNALLED)) + (close-subprocess-i/o process))) + (subprocess-list)))) (define-integrable subprocess-job-control-available? (ucode-primitive os-job-control? 0)) -- 2.25.1