Set-cloexec to #t for unrevealed ports.

This commit is contained in:
mainzelm 2002-02-26 08:42:56 +00:00
parent 380fee6612
commit 45305e7555
1 changed files with 3 additions and 1 deletions

View File

@ -17,7 +17,9 @@
(ch-number (channel-os-index ch)))
(if (not (= (fdport-data:revealed fdport*) 0))
(table-set! fdports ch-number fdport)
(weak-table-set! fdports ch-number fdport))))
(begin
(weak-table-set! fdports ch-number fdport)
(%set-cloexec (fdport-data:fd (port-data fdport)) #t)))))
(define (maybe-fdes->port fdes)
(weak-table-ref fdports fdes))