summaryrefslogtreecommitdiff
path: root/src/mod_vhostdb_mysql.c
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2020-11-26 15:17:02 -0500
committerGlenn Strauss <gstrauss@gluelogic.com>2023-05-03 23:11:34 -0400
commitabaf0a5f4d17206340f54420558fc7dfaae62e4f (patch)
tree10c041f2a1edc46e31424dde903d15b599c9b564 /src/mod_vhostdb_mysql.c
parent9b9dd8efafbf74b173f7d79f791b0736c797900f (diff)
downloadlighttpd-git-abaf0a5f4d17206340f54420558fc7dfaae62e4f.tar.gz
[core] _WIN32 socket-compat, filesystem-compat
_WIN32 is sufficiently different -- *different*; not better -- that isolating _WIN32 code is clearer than #ifdef _WIN32 in almost every func in fdevent.c _WIN32-specific fdevent_socket_* funcs _WIN32 SOCKET fds must be closed with closesocket(), not close() _WIN32 HANDLE_FLAG_INHERIT for FD_CLOEXEC _WIN32 use _sopen_s() without _O_TEMPORARY Use _sopen_s() without _O_TEMPORARY in fdevent_mkostemp(). _O_TEMPORARY would remove file once last handle to file is closed. Temporary files in chunkqueue may be closed for large request/response _WIN32 fdevent_rename() using MoveFileExA _WIN32 rename() fails if the target file already exists. Alternatives are MoveFileExA() or ReplaceFileA(). Both of the above fail if either oldfile or newfile are open, so - not atomic - may fail sporadically
Diffstat (limited to 'src/mod_vhostdb_mysql.c')
-rw-r--r--src/mod_vhostdb_mysql.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mod_vhostdb_mysql.c b/src/mod_vhostdb_mysql.c
index 0cf18603..b49b0617 100644
--- a/src/mod_vhostdb_mysql.c
+++ b/src/mod_vhostdb_mysql.c
@@ -114,7 +114,8 @@ static int mod_vhostdb_dbconf_setup (server *srv, const array *opts, void **vdat
return -1;
}
- fdevent_setfd_cloexec(dbconn->net.fd);
+ my_socket sfd = mysql_get_socket(dbconn);
+ (void)fdevent_socket_set_cloexec(sfd);
dbconf = (vhostdb_config *)ck_calloc(1, sizeof(*dbconf));
dbconf->dbconn = dbconn;