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;
/* 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;
}
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) {
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;
}
/* }}} */