HCoop
/
bpt
/
guile.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1cf49a8
)
* popen.scm (open-process): after forking, close all ports except
author
Gary Houston
<ghouston@arglist.com>
Mon, 10 Apr 2000 21:55:53 +0000
(21:55 +0000)
committer
Gary Houston
<ghouston@arglist.com>
Mon, 10 Apr 2000 21:55:53 +0000
(21:55 +0000)
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.
ice-9/popen.scm
patch
|
blob
|
blame
|
history
diff --git
a/ice-9/popen.scm
b/ice-9/popen.scm
index
35feb74
..
5689e5f
100644
(file)
--- a/
ice-9/popen.scm
+++ b/
ice-9/popen.scm
@@
-23,9
+23,7
@@
(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))