[plt-scheme] Bug in process function call?

From: pp (pedro.e.pinto at gmail.com)
Date: Thu Oct 23 14:28:02 EDT 2008

Hi there,

I have been unable to kill a process started through the "process"
call on Windows XP. The snippet below illustrates. I used notepad as
an example but launching mzscheme itself also presents the same
problem - except that mzscheme does get killed when stdin is closed.


#lang scheme

(require scheme/system)

(define l (process "notepad"))
(define stdout (first l))
(define stdin (second l))
(define ex (third l))
(define stderr (fourth l))
(define ctrl (fifth l))

(define (pause)

(ctrl 'status)
(printf "Kill~n")
(ctrl 'kill)
(ctrl 'status)

(printf "close stdout~n")
(close-input-port stdout)
(ctrl 'status)

(printf "close stderr~n")
(close-input-port stderr)
(ctrl 'status)

(printf "close stdin~n")
(close-output-port stdin)
(ctrl 'status)

Posted on the users mailing list.