1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-29 08:20:20 +02:00

* popen.scm (open-process): after forking, close all ports except

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.
This commit is contained in:
Gary Houston 2000-04-10 21:55:53 +00:00
parent 1cf49a85c9
commit 70cb4fa6ac

View file

@ -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))