diff --git a/collects/tests/racket/subprocess.rktl b/collects/tests/racket/subprocess.rktl index 49685c3069..5661042d0f 100644 --- a/collects/tests/racket/subprocess.rktl +++ b/collects/tests/racket/subprocess.rktl @@ -388,7 +388,7 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (let ([try - (lambda (post-shutdown) + (lambda (post-shutdown wait?) (let ([c (make-custodian)]) (let ([l (parameterize ([current-custodian c]) (process* self @@ -397,13 +397,16 @@ (test 'running (list-ref l 4) 'status) (custodian-shutdown-all c) (sleep 0.1) + (when (and wait? + (eq? post-shutdown 'done-error)) + ((list-ref l 4) 'wait)) (test post-shutdown (list-ref l 4) 'status) ((list-ref l 4) 'kill))))]) - (try 'running) + (try 'running #f) (parameterize ([current-subprocess-custodian-mode 'kill]) - (try 'done-error)) + (try 'done-error #f)) (parameterize ([current-subprocess-custodian-mode 'interrupt]) - (try (if (eq? 'windows (system-type)) 'running 'done-error)))) + (try (if (eq? 'windows (system-type)) 'running 'done-error) #t))) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; process groups