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:
parent
1cf49a85c9
commit
70cb4fa6ac
1 changed files with 1 additions and 3 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue