1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 03:40:34 +02:00

web server: use CLOEXEC

* module/web/server/http.scm (http-read): Pass SOCK_CLOEXEC to
  `accept'.
This commit is contained in:
Andy Wingo 2012-02-08 20:11:57 +01:00
parent d7bbda6fd7
commit 6fa75029fa

View file

@ -90,7 +90,7 @@
;; A new client. Add to set, poll, and loop. ;; A new client. Add to set, poll, and loop.
;; ;;
;; FIXME: preserve meta-info. ;; FIXME: preserve meta-info.
(let ((client (accept (poll-set-port poll-set idx)))) (let ((client (accept (poll-set-port poll-set idx) SOCK_CLOEXEC)))
;; Buffer input and output on this port. ;; Buffer input and output on this port.
(setvbuf (car client) _IOFBF) (setvbuf (car client) _IOFBF)
;; From "HOP, A Fast Server for the Diffuse Web", Serrano. ;; From "HOP, A Fast Server for the Diffuse Web", Serrano.