Browse Source

[core] set one-shot mode fd O_NONBLOCK, FD_CLOEXEC

(thx citaylor)

x-ref:
  https://redmine.lighttpd.net/boards/2/topics/7487
personal/stbuehler/mod-csrf
Glenn Strauss 5 years ago
parent
commit
c23f8fdd6f
  1. 3
      src/server.c

3
src/server.c

@ -516,6 +516,9 @@ static int server_oneshot_init(server *srv, int fd) {
return 0;
}
/*(must set flags; fd did not pass through fdevent accept() logic)*/
fdevent_fcntl_set_nb_cloexec(srv->ev, fd);
if (cnt_addr.plain.sa_family != AF_UNIX) {
network_accept_tcp_nagle_disable(fd);
}

Loading…
Cancel
Save