the end of the pipe to the parent. otherwise move->fdes and
the exec'd program and the exit handlers can interfere with file
descriptors still in use in parent ports.
(cond ((= pid 0)
;; child
(set-batch-mode?! #t)
(cond ((= pid 0)
;; child
(set-batch-mode?! #t)
- (if reading
- (close-port (car p))
- (close-port (cdr p)))
+ (close-all-ports-except (if reading (cdr p) (car p)))
(move->fdes (if reading (cdr p) (car p))
(if reading 1 0))
(apply execlp prog prog args))
(move->fdes (if reading (cdr p) (car p))
(if reading 1 0))
(apply execlp prog prog args))