summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sapi/fpm/fpm/fpm_log.c4
-rw-r--r--sapi/fpm/fpm/fpm_signals.c4
-rw-r--r--sapi/fpm/fpm/fpm_sockets.c4
-rw-r--r--sapi/fpm/fpm/fpm_stdio.c4
4 files changed, 12 insertions, 4 deletions
diff --git a/sapi/fpm/fpm/fpm_log.c b/sapi/fpm/fpm/fpm_log.c
index 303acb2186..4e1a057db1 100644
--- a/sapi/fpm/fpm/fpm_log.c
+++ b/sapi/fpm/fpm/fpm_log.c
@@ -57,7 +57,9 @@ int fpm_log_open(int reopen) /* {{{ */
wp->log_fd = fd;
}
- fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC);
+ if (0 > fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC)) {
+ zlog(ZLOG_WARNING, "failed to change attribute of access_log");
+ }
}
return ret;
diff --git a/sapi/fpm/fpm/fpm_signals.c b/sapi/fpm/fpm/fpm_signals.c
index 8993a860ae..c5d0692f18 100644
--- a/sapi/fpm/fpm/fpm_signals.c
+++ b/sapi/fpm/fpm/fpm_signals.c
@@ -145,7 +145,9 @@ static void sig_soft_quit(int signo) /* {{{ */
/* closing fastcgi listening socket will force fcgi_accept() exit immediately */
close(0);
- socket(AF_UNIX, SOCK_STREAM, 0);
+ if (0 > socket(AF_UNIX, SOCK_STREAM, 0)) {
+ zlog(ZLOG_WARNING, "failed to create a new socket");
+ }
fpm_php_soft_quit();
errno = saved_errno;
}
diff --git a/sapi/fpm/fpm/fpm_sockets.c b/sapi/fpm/fpm/fpm_sockets.c
index df94967db1..3dcad4e70f 100644
--- a/sapi/fpm/fpm/fpm_sockets.c
+++ b/sapi/fpm/fpm/fpm_sockets.c
@@ -176,7 +176,9 @@ static int fpm_sockets_new_listening_socket(struct fpm_worker_pool_s *wp, struct
return -1;
}
- setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &flags, sizeof(flags));
+ if (0 > setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &flags, sizeof(flags))) {
+ zlog(ZLOG_WARNING, "failed to change socket attribute");
+ }
if (wp->listen_address_domain == FPM_AF_UNIX) {
if (fpm_socket_unix_test_connect((struct sockaddr_un *)sa, socklen) == 0) {
diff --git a/sapi/fpm/fpm/fpm_stdio.c b/sapi/fpm/fpm/fpm_stdio.c
index ebe43a278d..10b867d00a 100644
--- a/sapi/fpm/fpm/fpm_stdio.c
+++ b/sapi/fpm/fpm/fpm_stdio.c
@@ -295,7 +295,9 @@ int fpm_stdio_open_error_log(int reopen) /* {{{ */
zlog_set_fd(fpm_globals.error_log_fd);
}
}
- fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC);
+ if (0 > fcntl(fd, F_SETFD, fcntl(fd, F_GETFD) | FD_CLOEXEC)) {
+ zlog(ZLOG_WARNING, "failed to change attribute of error_log");
+ }
return 0;
}
/* }}} */