Browse Source

Set FD_CLOEXEC for bound sockets before pipe-logger forks (fixes #2026)

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@2578 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.4.24
Stefan Bühler 13 years ago
parent
commit
e1645ed287
  1. 1
      NEWS
  2. 5
      src/network.c

1
NEWS

@ -16,6 +16,7 @@ NEWS
* Fix unused function webdav_lockdiscovery in mod_webdav
* cmake: Fix crypt lib check
* cmake: Add -export-dynamic to link flags, fixes build on FreeBSD
* Set FD_CLOEXEC for bound sockets before pipe-logger forks (fixes #2026)
- 1.4.23 - 2009-06-19
* Added some extra warning options in cmake and fix the resulting warnings (unused/static functions)

5
src/network.c

@ -167,6 +167,11 @@ static int network_server_init(server *srv, buffer *host_token, specific_config
}
}
#ifdef FD_CLOEXEC
/* set FD_CLOEXEC now, fdevent_fcntl_set is called later; needed for pipe-logger forks */
fcntl(srv_socket->fd, F_SETFD, FD_CLOEXEC);
#endif
/* */
srv->cur_fds = srv_socket->fd;

Loading…
Cancel
Save