ignore return value from fcntl() FD_CLOEXEC

setting or removing FD_CLOEXEC flag does not fail

Also the use in mod_fastcgi and mod_scgi is in child after fork().
If the fd already happens to be 0 (should not happen in current code)
and removing the FD_CLOEXEC flag fails, then the backend will fail
to start.
personal/stbuehler/mod-csrf
Glenn Strauss 7 years ago
parent 9173d9aa7d
commit 1e129cce45

@ -1065,7 +1065,7 @@ static int fcgi_spawn_connection(server *srv,
}
#ifdef SOCK_CLOEXEC
else
fcntl(fcgi_fd, F_SETFD, 0); /* clear cloexec */
(void)fcntl(fcgi_fd, F_SETFD, 0); /* clear cloexec */
#endif
/* we don't need the client socket */

@ -829,7 +829,7 @@ static int scgi_spawn_connection(server *srv,
}
#ifdef SOCK_CLOEXEC
else
fcntl(scgi_fd, F_SETFD, 0); /* clear cloexec */
(void)fcntl(scgi_fd, F_SETFD, 0); /* clear cloexec */
#endif
/* we don't need the client socket */

Loading…
Cancel
Save