mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
FPM fix strict prototype warnings.
Closes GH-8986.
This commit is contained in:
parent
f86629569c
commit
e2a5428ca0
43 changed files with 116 additions and 184 deletions
|
@ -29,7 +29,7 @@
|
|||
#include <errno.h>
|
||||
|
||||
static int fpm_event_devpoll_init(int max);
|
||||
static int fpm_event_devpoll_clean();
|
||||
static int fpm_event_devpoll_clean(void);
|
||||
static int fpm_event_devpoll_wait(struct fpm_event_queue_s *queue, unsigned long int timeout);
|
||||
static int fpm_event_devpoll_add(struct fpm_event_s *ev);
|
||||
static int fpm_event_devpoll_remove(struct fpm_event_s *ev);
|
||||
|
@ -51,7 +51,7 @@ static int npollfds = 0;
|
|||
|
||||
#endif /* HAVE_DEVPOLL */
|
||||
|
||||
struct fpm_event_module_s *fpm_event_devpoll_module() /* {{{ */
|
||||
struct fpm_event_module_s *fpm_event_devpoll_module(void)
|
||||
{
|
||||
#ifdef HAVE_DEVPOLL
|
||||
return &devpoll_module;
|
||||
|
@ -59,7 +59,6 @@ struct fpm_event_module_s *fpm_event_devpoll_module() /* {{{ */
|
|||
return NULL;
|
||||
#endif /* HAVE_DEVPOLL */
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
#ifdef HAVE_DEVPOLL
|
||||
|
||||
|
@ -113,7 +112,7 @@ static int fpm_event_devpoll_init(int max) /* {{{ */
|
|||
/*
|
||||
* Clean the module
|
||||
*/
|
||||
static int fpm_event_devpoll_clean() /* {{{ */
|
||||
static int fpm_event_devpoll_clean(void)
|
||||
{
|
||||
/* close /dev/poll if open */
|
||||
if (dpfd > -1) {
|
||||
|
@ -136,7 +135,6 @@ static int fpm_event_devpoll_clean() /* {{{ */
|
|||
npollfds = 0;
|
||||
return 0;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/*
|
||||
* wait for events or timeout
|
||||
|
|
|
@ -20,6 +20,6 @@
|
|||
#include "../fpm_config.h"
|
||||
#include "../fpm_events.h"
|
||||
|
||||
struct fpm_event_module_s *fpm_event_devpoll_module();
|
||||
struct fpm_event_module_s *fpm_event_devpoll_module(void);
|
||||
|
||||
#endif /* FPM_EVENTS_DEVPOLL_H */
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#include <errno.h>
|
||||
|
||||
static int fpm_event_epoll_init(int max);
|
||||
static int fpm_event_epoll_clean();
|
||||
static int fpm_event_epoll_clean(void);
|
||||
static int fpm_event_epoll_wait(struct fpm_event_queue_s *queue, unsigned long int timeout);
|
||||
static int fpm_event_epoll_add(struct fpm_event_s *ev);
|
||||
static int fpm_event_epoll_remove(struct fpm_event_s *ev);
|
||||
|
@ -46,7 +46,7 @@ static int epollfd = -1;
|
|||
|
||||
#endif /* HAVE_EPOLL */
|
||||
|
||||
struct fpm_event_module_s *fpm_event_epoll_module() /* {{{ */
|
||||
struct fpm_event_module_s *fpm_event_epoll_module(void)
|
||||
{
|
||||
#ifdef HAVE_EPOLL
|
||||
return &epoll_module;
|
||||
|
@ -54,7 +54,6 @@ struct fpm_event_module_s *fpm_event_epoll_module() /* {{{ */
|
|||
return NULL;
|
||||
#endif /* HAVE_EPOLL */
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
#ifdef HAVE_EPOLL
|
||||
|
||||
|
@ -92,7 +91,7 @@ static int fpm_event_epoll_init(int max) /* {{{ */
|
|||
/*
|
||||
* Clean the module
|
||||
*/
|
||||
static int fpm_event_epoll_clean() /* {{{ */
|
||||
static int fpm_event_epoll_clean(void)
|
||||
{
|
||||
/* free epollfds */
|
||||
if (epollfds) {
|
||||
|
@ -108,7 +107,6 @@ static int fpm_event_epoll_clean() /* {{{ */
|
|||
|
||||
return 0;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/*
|
||||
* wait for events or timeout
|
||||
|
|
|
@ -20,6 +20,6 @@
|
|||
#include "../fpm_config.h"
|
||||
#include "../fpm_events.h"
|
||||
|
||||
struct fpm_event_module_s *fpm_event_epoll_module();
|
||||
struct fpm_event_module_s *fpm_event_epoll_module(void);
|
||||
|
||||
#endif /* FPM_EVENTS_EPOLL_H */
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include <string.h>
|
||||
|
||||
static int fpm_event_poll_init(int max);
|
||||
static int fpm_event_poll_clean();
|
||||
static int fpm_event_poll_clean(void);
|
||||
static int fpm_event_poll_wait(struct fpm_event_queue_s *queue, unsigned long int timeout);
|
||||
static int fpm_event_poll_add(struct fpm_event_s *ev);
|
||||
static int fpm_event_poll_remove(struct fpm_event_s *ev);
|
||||
|
@ -50,7 +50,7 @@ static int next_free_slot = 0;
|
|||
/*
|
||||
* return the module configuration
|
||||
*/
|
||||
struct fpm_event_module_s *fpm_event_poll_module() /* {{{ */
|
||||
struct fpm_event_module_s *fpm_event_poll_module(void)
|
||||
{
|
||||
#ifdef HAVE_POLL
|
||||
return &poll_module;
|
||||
|
@ -58,14 +58,13 @@ struct fpm_event_module_s *fpm_event_poll_module() /* {{{ */
|
|||
return NULL;
|
||||
#endif /* HAVE_POLL */
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
#ifdef HAVE_POLL
|
||||
|
||||
/*
|
||||
* Init the module
|
||||
*/
|
||||
static int fpm_event_poll_init(int max) /* {{{ */
|
||||
static int fpm_event_poll_init(int max)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -99,12 +98,11 @@ static int fpm_event_poll_init(int max) /* {{{ */
|
|||
npollfds = max;
|
||||
return 0;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/*
|
||||
* Clean the module
|
||||
*/
|
||||
static int fpm_event_poll_clean() /* {{{ */
|
||||
static int fpm_event_poll_clean(void)
|
||||
{
|
||||
/* free pollfds */
|
||||
if (pollfds) {
|
||||
|
@ -121,7 +119,6 @@ static int fpm_event_poll_clean() /* {{{ */
|
|||
npollfds = 0;
|
||||
return 0;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/*
|
||||
* wait for events or timeout
|
||||
|
|
|
@ -20,6 +20,6 @@
|
|||
#include "../fpm_config.h"
|
||||
#include "../fpm_events.h"
|
||||
|
||||
struct fpm_event_module_s *fpm_event_poll_module();
|
||||
struct fpm_event_module_s *fpm_event_poll_module(void);
|
||||
|
||||
#endif /* FPM_EVENTS_POLL_H */
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
#include <errno.h>
|
||||
|
||||
static int fpm_event_port_init(int max);
|
||||
static int fpm_event_port_clean();
|
||||
static int fpm_event_port_clean(void);
|
||||
static int fpm_event_port_wait(struct fpm_event_queue_s *queue, unsigned long int timeout);
|
||||
static int fpm_event_port_add(struct fpm_event_s *ev);
|
||||
static int fpm_event_port_remove(struct fpm_event_s *ev);
|
||||
|
@ -90,7 +90,7 @@ static int fpm_event_port_init(int max) /* {{{ */
|
|||
/*
|
||||
* Clean the module
|
||||
*/
|
||||
static int fpm_event_port_clean() /* {{{ */
|
||||
static int fpm_event_port_clean(void)
|
||||
{
|
||||
if (pfd > -1) {
|
||||
close(pfd);
|
||||
|
@ -105,7 +105,6 @@ static int fpm_event_port_clean() /* {{{ */
|
|||
nevents = 0;
|
||||
return 0;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
/*
|
||||
* wait for events or timeout
|
||||
|
|
|
@ -20,6 +20,6 @@
|
|||
#include "../fpm_config.h"
|
||||
#include "../fpm_events.h"
|
||||
|
||||
struct fpm_event_module_s *fpm_event_port_module();
|
||||
struct fpm_event_module_s *fpm_event_port_module(void);
|
||||
|
||||
#endif /* FPM_EVENTS_PORT_H */
|
||||
|
|
|
@ -53,7 +53,7 @@ static fd_set fds;
|
|||
/*
|
||||
* return the module configuration
|
||||
*/
|
||||
struct fpm_event_module_s *fpm_event_select_module() /* {{{ */
|
||||
struct fpm_event_module_s *fpm_event_select_module(void)
|
||||
{
|
||||
#ifdef HAVE_SELECT
|
||||
return &select_module;
|
||||
|
@ -61,7 +61,6 @@ struct fpm_event_module_s *fpm_event_select_module() /* {{{ */
|
|||
return NULL;
|
||||
#endif /* HAVE_SELECT */
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
#ifdef HAVE_SELECT
|
||||
|
||||
|
|
|
@ -20,6 +20,6 @@
|
|||
#include "../fpm_config.h"
|
||||
#include "../fpm_events.h"
|
||||
|
||||
struct fpm_event_module_s *fpm_event_select_module();
|
||||
struct fpm_event_module_s *fpm_event_select_module(void);
|
||||
|
||||
#endif /* FPM_EVENTS_SELECT_H */
|
||||
|
|
|
@ -38,7 +38,7 @@ static void fpm_children_cleanup(int which, void *arg) /* {{{ */
|
|||
}
|
||||
/* }}} */
|
||||
|
||||
static struct fpm_child_s *fpm_child_alloc() /* {{{ */
|
||||
static struct fpm_child_s *fpm_child_alloc(void)
|
||||
{
|
||||
struct fpm_child_s *ret;
|
||||
|
||||
|
@ -52,7 +52,6 @@ static struct fpm_child_s *fpm_child_alloc() /* {{{ */
|
|||
ret->scoreboard_i = -1;
|
||||
return ret;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static void fpm_child_free(struct fpm_child_s *child) /* {{{ */
|
||||
{
|
||||
|
@ -177,7 +176,7 @@ int fpm_children_free(struct fpm_child_s *child) /* {{{ */
|
|||
}
|
||||
/* }}} */
|
||||
|
||||
void fpm_children_bury() /* {{{ */
|
||||
void fpm_children_bury(void)
|
||||
{
|
||||
int status;
|
||||
pid_t pid;
|
||||
|
@ -303,7 +302,6 @@ void fpm_children_bury() /* {{{ */
|
|||
}
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static struct fpm_child_s *fpm_resources_prepare(struct fpm_worker_pool_s *wp) /* {{{ */
|
||||
{
|
||||
|
@ -472,7 +470,7 @@ int fpm_children_create_initial(struct fpm_worker_pool_s *wp) /* {{{ */
|
|||
}
|
||||
/* }}} */
|
||||
|
||||
int fpm_children_init_main() /* {{{ */
|
||||
int fpm_children_init_main(void)
|
||||
{
|
||||
if (fpm_global_config.emergency_restart_threshold &&
|
||||
fpm_global_config.emergency_restart_interval) {
|
||||
|
@ -492,4 +490,3 @@ int fpm_children_init_main() /* {{{ */
|
|||
|
||||
return 0;
|
||||
}
|
||||
/* }}} */
|
||||
|
|
|
@ -12,8 +12,8 @@
|
|||
|
||||
int fpm_children_create_initial(struct fpm_worker_pool_s *wp);
|
||||
int fpm_children_free(struct fpm_child_s *child);
|
||||
void fpm_children_bury();
|
||||
int fpm_children_init_main();
|
||||
void fpm_children_bury(void);
|
||||
int fpm_children_init_main(void);
|
||||
int fpm_children_make(struct fpm_worker_pool_s *wp, int in_event_loop, int nb_to_spawn, int is_debug);
|
||||
|
||||
struct fpm_child_s;
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
static int monotonic_works;
|
||||
|
||||
int fpm_clock_init() /* {{{ */
|
||||
int fpm_clock_init(void)
|
||||
{
|
||||
struct timespec ts;
|
||||
|
||||
|
@ -27,7 +27,6 @@ int fpm_clock_init() /* {{{ */
|
|||
|
||||
return 0;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
int fpm_clock_get(struct timeval *tv) /* {{{ */
|
||||
{
|
||||
|
@ -59,7 +58,7 @@ static clock_serv_t mach_clock;
|
|||
|
||||
/* this code borrowed from here: http://lists.apple.com/archives/Darwin-development/2002/Mar/msg00746.html */
|
||||
/* mach_clock also should be re-initialized in child process after fork */
|
||||
int fpm_clock_init() /* {{{ */
|
||||
int fpm_clock_init(void)
|
||||
{
|
||||
kern_return_t ret;
|
||||
mach_timespec_t aTime;
|
||||
|
@ -81,7 +80,6 @@ int fpm_clock_init() /* {{{ */
|
|||
|
||||
return 0;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
int fpm_clock_get(struct timeval *tv) /* {{{ */
|
||||
{
|
||||
|
@ -104,11 +102,10 @@ int fpm_clock_get(struct timeval *tv) /* {{{ */
|
|||
|
||||
#else /* no clock */
|
||||
|
||||
int fpm_clock_init() /* {{{ */
|
||||
int fpm_clock_init(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
int fpm_clock_get(struct timeval *tv) /* {{{ */
|
||||
{
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
#include <sys/time.h>
|
||||
|
||||
int fpm_clock_init();
|
||||
int fpm_clock_init(void);
|
||||
int fpm_clock_get(struct timeval *tv);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -591,7 +591,7 @@ static char *fpm_conf_set_array(zval *key, zval *value, void **config, int conve
|
|||
}
|
||||
/* }}} */
|
||||
|
||||
static void *fpm_worker_pool_config_alloc() /* {{{ */
|
||||
static void *fpm_worker_pool_config_alloc(void)
|
||||
{
|
||||
struct fpm_worker_pool_s *wp;
|
||||
|
||||
|
@ -632,7 +632,6 @@ static void *fpm_worker_pool_config_alloc() /* {{{ */
|
|||
current_wp = wp;
|
||||
return wp->config;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
int fpm_worker_pool_config_free(struct fpm_worker_pool_config_s *wpc) /* {{{ */
|
||||
{
|
||||
|
@ -792,7 +791,7 @@ static int fpm_evaluate_full_path(char **path, struct fpm_worker_pool_s *wp, cha
|
|||
}
|
||||
/* }}} */
|
||||
|
||||
static int fpm_conf_process_all_pools() /* {{{ */
|
||||
static int fpm_conf_process_all_pools(void)
|
||||
{
|
||||
struct fpm_worker_pool_s *wp, *wp2;
|
||||
|
||||
|
@ -1186,9 +1185,8 @@ static int fpm_conf_process_all_pools() /* {{{ */
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
int fpm_conf_unlink_pid() /* {{{ */
|
||||
int fpm_conf_unlink_pid(void)
|
||||
{
|
||||
if (fpm_global_config.pid_file) {
|
||||
if (0 > unlink(fpm_global_config.pid_file)) {
|
||||
|
@ -1198,9 +1196,8 @@ int fpm_conf_unlink_pid() /* {{{ */
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
int fpm_conf_write_pid() /* {{{ */
|
||||
int fpm_conf_write_pid(void)
|
||||
{
|
||||
int fd;
|
||||
|
||||
|
@ -1227,7 +1224,6 @@ int fpm_conf_write_pid() /* {{{ */
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static int fpm_conf_post_process(int force_daemon) /* {{{ */
|
||||
{
|
||||
|
@ -1654,7 +1650,7 @@ int fpm_conf_load_ini_file(char *filename) /* {{{ */
|
|||
}
|
||||
/* }}} */
|
||||
|
||||
static void fpm_conf_dump() /* {{{ */
|
||||
static void fpm_conf_dump(void)
|
||||
{
|
||||
struct fpm_worker_pool_s *wp;
|
||||
|
||||
|
@ -1757,7 +1753,6 @@ static void fpm_conf_dump() /* {{{ */
|
|||
zlog(ZLOG_NOTICE, " ");
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
int fpm_conf_init_main(int test_conf, int force_daemon) /* {{{ */
|
||||
{
|
||||
|
|
|
@ -118,7 +118,7 @@ enum {
|
|||
|
||||
int fpm_conf_init_main(int test_conf, int force_daemon);
|
||||
int fpm_worker_pool_config_free(struct fpm_worker_pool_config_s *wpc);
|
||||
int fpm_conf_write_pid();
|
||||
int fpm_conf_unlink_pid();
|
||||
int fpm_conf_write_pid(void);
|
||||
int fpm_conf_unlink_pid(void);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -60,7 +60,7 @@ int setenv(char *name, char *value, int overwrite) /* {{{ */
|
|||
#endif
|
||||
|
||||
#ifndef HAVE_CLEARENV
|
||||
void clearenv() /* {{{ */
|
||||
void clearenv(void)
|
||||
{
|
||||
char **envp;
|
||||
char *s;
|
||||
|
@ -79,7 +79,6 @@ void clearenv() /* {{{ */
|
|||
}
|
||||
|
||||
}
|
||||
/* }}} */
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_UNSETENV
|
||||
|
@ -196,7 +195,7 @@ static int fpm_env_conf_wp(struct fpm_worker_pool_s *wp) /* {{{ */
|
|||
}
|
||||
/* }}} */
|
||||
|
||||
int fpm_env_init_main() /* {{{ */
|
||||
int fpm_env_init_main(void)
|
||||
{
|
||||
struct fpm_worker_pool_s *wp;
|
||||
char *title;
|
||||
|
@ -274,4 +273,3 @@ int fpm_env_init_main() /* {{{ */
|
|||
efree(title);
|
||||
return 0;
|
||||
}
|
||||
/* }}} */
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
#define SETPROCTITLE_PREFIX "php-fpm: "
|
||||
|
||||
int fpm_env_init_child(struct fpm_worker_pool_s *wp);
|
||||
int fpm_env_init_main();
|
||||
int fpm_env_init_main(void);
|
||||
void fpm_env_setproctitle(char *title);
|
||||
|
||||
extern char **environ;
|
||||
|
@ -18,7 +18,7 @@ int setenv(char *name, char *value, int overwrite);
|
|||
#endif
|
||||
|
||||
#ifndef HAVE_CLEARENV
|
||||
void clearenv();
|
||||
void clearenv(void);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -304,19 +304,17 @@ int fpm_event_pre_init(char *machanism) /* {{{ */
|
|||
}
|
||||
/* }}} */
|
||||
|
||||
const char *fpm_event_machanism_name() /* {{{ */
|
||||
const char *fpm_event_machanism_name(void)
|
||||
{
|
||||
return module ? module->name : NULL;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
int fpm_event_support_edge_trigger() /* {{{ */
|
||||
int fpm_event_support_edge_trigger(void)
|
||||
{
|
||||
return module ? module->support_edge_trigger : 0;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
int fpm_event_init_main() /* {{{ */
|
||||
int fpm_event_init_main(void)
|
||||
{
|
||||
struct fpm_worker_pool_s *wp;
|
||||
int max;
|
||||
|
@ -352,7 +350,6 @@ int fpm_event_init_main() /* {{{ */
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
void fpm_event_loop(int err) /* {{{ */
|
||||
{
|
||||
|
|
|
@ -39,12 +39,12 @@ struct fpm_event_module_s {
|
|||
|
||||
void fpm_event_loop(int err);
|
||||
void fpm_event_fire(struct fpm_event_s *ev);
|
||||
int fpm_event_init_main();
|
||||
int fpm_event_init_main(void);
|
||||
int fpm_event_set(struct fpm_event_s *ev, int fd, int flags, void (*callback)(struct fpm_event_s *, short, void *), void *arg);
|
||||
int fpm_event_add(struct fpm_event_s *ev, unsigned long int timeout);
|
||||
int fpm_event_del(struct fpm_event_s *ev);
|
||||
int fpm_event_pre_init(char *machanism);
|
||||
const char *fpm_event_machanism_name();
|
||||
int fpm_event_support_edge_trigger();
|
||||
const char *fpm_event_machanism_name(void);
|
||||
int fpm_event_support_edge_trigger(void);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -155,41 +155,35 @@ static int fpm_php_set_fcgi_mgmt_vars(struct fpm_worker_pool_s *wp) /* {{{ */
|
|||
/* }}} */
|
||||
#endif
|
||||
|
||||
char *fpm_php_script_filename(void) /* {{{ */
|
||||
char *fpm_php_script_filename(void)
|
||||
{
|
||||
return SG(request_info).path_translated;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
char *fpm_php_request_uri(void) /* {{{ */
|
||||
char *fpm_php_request_uri(void)
|
||||
{
|
||||
return (char *) SG(request_info).request_uri;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
char *fpm_php_request_method(void) /* {{{ */
|
||||
char *fpm_php_request_method(void)
|
||||
{
|
||||
return (char *) SG(request_info).request_method;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
char *fpm_php_query_string(void) /* {{{ */
|
||||
char *fpm_php_query_string(void)
|
||||
{
|
||||
return SG(request_info).query_string;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
char *fpm_php_auth_user(void) /* {{{ */
|
||||
char *fpm_php_auth_user(void)
|
||||
{
|
||||
return SG(request_info).auth_user;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
size_t fpm_php_content_length(void) /* {{{ */
|
||||
size_t fpm_php_content_length(void)
|
||||
{
|
||||
return SG(request_info).content_length;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static void fpm_php_cleanup(int which, void *arg) /* {{{ */
|
||||
{
|
||||
|
@ -201,20 +195,18 @@ static void fpm_php_cleanup(int which, void *arg) /* {{{ */
|
|||
}
|
||||
/* }}} */
|
||||
|
||||
void fpm_php_soft_quit() /* {{{ */
|
||||
void fpm_php_soft_quit(void)
|
||||
{
|
||||
fcgi_terminate();
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
int fpm_php_init_main() /* {{{ */
|
||||
int fpm_php_init_main(void)
|
||||
{
|
||||
if (0 > fpm_cleanup_add(FPM_CLEANUP_PARENT, fpm_php_cleanup, 0)) {
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
int fpm_php_init_child(struct fpm_worker_pool_s *wp) /* {{{ */
|
||||
{
|
||||
|
|
|
@ -38,8 +38,8 @@ char *fpm_php_request_method(void);
|
|||
char *fpm_php_query_string(void);
|
||||
char *fpm_php_auth_user(void);
|
||||
size_t fpm_php_content_length(void);
|
||||
void fpm_php_soft_quit();
|
||||
int fpm_php_init_main();
|
||||
void fpm_php_soft_quit(void);
|
||||
int fpm_php_init_main(void);
|
||||
int fpm_php_apply_defines_ex(struct key_value_s *kv, int mode);
|
||||
int fpm_php_limit_extensions(char *path);
|
||||
char* fpm_php_get_string_from_table(zend_string *table, char *key);
|
||||
|
|
|
@ -63,7 +63,7 @@ static int fpm_pctl_timeout_set(int sec) /* {{{ */
|
|||
}
|
||||
/* }}} */
|
||||
|
||||
static void fpm_pctl_exit() /* {{{ */
|
||||
static void fpm_pctl_exit(void)
|
||||
{
|
||||
zlog(ZLOG_NOTICE, "exiting, bye-bye!");
|
||||
|
||||
|
@ -71,11 +71,10 @@ static void fpm_pctl_exit() /* {{{ */
|
|||
fpm_cleanups_run(FPM_CLEANUP_PARENT_EXIT_MAIN);
|
||||
exit(FPM_EXIT_OK);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
#define optional_arg(c) (saved_argc > c ? ", \"" : ""), (saved_argc > c ? saved_argv[c] : ""), (saved_argc > c ? "\"" : "")
|
||||
|
||||
static void fpm_pctl_exec() /* {{{ */
|
||||
static void fpm_pctl_exec(void)
|
||||
{
|
||||
zlog(ZLOG_DEBUG, "Blocking some signals before reexec");
|
||||
if (0 > fpm_signals_block()) {
|
||||
|
@ -104,9 +103,8 @@ static void fpm_pctl_exec() /* {{{ */
|
|||
zlog(ZLOG_SYSERROR, "failed to reload: execvp() failed");
|
||||
exit(FPM_EXIT_SOFTWARE);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static void fpm_pctl_action_last() /* {{{ */
|
||||
static void fpm_pctl_action_last(void)
|
||||
{
|
||||
switch (fpm_state) {
|
||||
case FPM_PCTL_STATE_RELOADING:
|
||||
|
@ -119,7 +117,6 @@ static void fpm_pctl_action_last() /* {{{ */
|
|||
break;
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
int fpm_pctl_kill(pid_t pid, int how) /* {{{ */
|
||||
{
|
||||
|
@ -175,7 +172,7 @@ void fpm_pctl_kill_all(int signo) /* {{{ */
|
|||
}
|
||||
/* }}} */
|
||||
|
||||
static void fpm_pctl_action_next() /* {{{ */
|
||||
static void fpm_pctl_action_next(void)
|
||||
{
|
||||
int sig, timeout;
|
||||
|
||||
|
@ -203,7 +200,6 @@ static void fpm_pctl_action_next() /* {{{ */
|
|||
fpm_signal_sent = sig;
|
||||
fpm_pctl_timeout_set(timeout);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
void fpm_pctl(int new_state, int action) /* {{{ */
|
||||
{
|
||||
|
@ -247,13 +243,12 @@ void fpm_pctl(int new_state, int action) /* {{{ */
|
|||
}
|
||||
/* }}} */
|
||||
|
||||
int fpm_pctl_can_spawn_children() /* {{{ */
|
||||
int fpm_pctl_can_spawn_children(void)
|
||||
{
|
||||
return fpm_state == FPM_PCTL_STATE_NORMAL;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
int fpm_pctl_child_exited() /* {{{ */
|
||||
int fpm_pctl_child_exited(void)
|
||||
{
|
||||
if (fpm_state == FPM_PCTL_STATE_NORMAL) {
|
||||
return 0;
|
||||
|
@ -264,9 +259,8 @@ int fpm_pctl_child_exited() /* {{{ */
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
int fpm_pctl_init_main() /* {{{ */
|
||||
int fpm_pctl_init_main(void)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -292,7 +286,6 @@ int fpm_pctl_init_main() /* {{{ */
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static void fpm_pctl_check_request_timeout(struct timeval *now) /* {{{ */
|
||||
{
|
||||
|
|
|
@ -16,14 +16,14 @@
|
|||
struct fpm_child_s;
|
||||
|
||||
void fpm_pctl(int new_state, int action);
|
||||
int fpm_pctl_can_spawn_children();
|
||||
int fpm_pctl_can_spawn_children(void);
|
||||
int fpm_pctl_kill(pid_t pid, int how);
|
||||
void fpm_pctl_kill_all(int signo);
|
||||
void fpm_pctl_heartbeat(struct fpm_event_s *ev, short which, void *arg);
|
||||
void fpm_pctl_perform_idle_server_maintenance_heartbeat(struct fpm_event_s *ev, short which, void *arg);
|
||||
void fpm_pctl_on_socket_accept(struct fpm_event_s *ev, short which, void *arg);
|
||||
int fpm_pctl_child_exited();
|
||||
int fpm_pctl_init_main();
|
||||
int fpm_pctl_child_exited(void);
|
||||
int fpm_pctl_init_main(void);
|
||||
|
||||
|
||||
enum {
|
||||
|
|
|
@ -34,7 +34,7 @@ const char *fpm_request_get_stage_name(int stage) {
|
|||
return requests_stages[stage];
|
||||
}
|
||||
|
||||
void fpm_request_accepting() /* {{{ */
|
||||
void fpm_request_accepting(void)
|
||||
{
|
||||
struct fpm_scoreboard_proc_s *proc;
|
||||
struct timeval now;
|
||||
|
@ -56,9 +56,8 @@ void fpm_request_accepting() /* {{{ */
|
|||
/* idle++, active-- */
|
||||
fpm_scoreboard_update_commit(1, -1, 0, 0, 0, 0, 0, FPM_SCOREBOARD_ACTION_INC, NULL);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
void fpm_request_reading_headers() /* {{{ */
|
||||
void fpm_request_reading_headers(void)
|
||||
{
|
||||
struct fpm_scoreboard_proc_s *proc;
|
||||
|
||||
|
@ -101,9 +100,8 @@ void fpm_request_reading_headers() /* {{{ */
|
|||
/* idle--, active++, request++ */
|
||||
fpm_scoreboard_update_commit(-1, 1, 0, 0, 1, 0, 0, FPM_SCOREBOARD_ACTION_INC, NULL);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
void fpm_request_info() /* {{{ */
|
||||
void fpm_request_info(void)
|
||||
{
|
||||
struct fpm_scoreboard_proc_s *proc;
|
||||
char *request_uri = fpm_php_request_uri();
|
||||
|
@ -151,9 +149,8 @@ void fpm_request_info() /* {{{ */
|
|||
|
||||
fpm_scoreboard_proc_release(proc);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
void fpm_request_executing() /* {{{ */
|
||||
void fpm_request_executing(void)
|
||||
{
|
||||
struct fpm_scoreboard_proc_s *proc;
|
||||
struct timeval now;
|
||||
|
@ -170,9 +167,8 @@ void fpm_request_executing() /* {{{ */
|
|||
proc->tv = now;
|
||||
fpm_scoreboard_proc_release(proc);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
void fpm_request_end(void) /* {{{ */
|
||||
void fpm_request_end(void)
|
||||
{
|
||||
struct fpm_scoreboard_proc_s *proc;
|
||||
struct timeval now;
|
||||
|
@ -204,9 +200,8 @@ void fpm_request_end(void) /* {{{ */
|
|||
proc->memory = memory;
|
||||
fpm_scoreboard_proc_release(proc);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
void fpm_request_finished() /* {{{ */
|
||||
void fpm_request_finished(void)
|
||||
{
|
||||
struct fpm_scoreboard_proc_s *proc;
|
||||
struct timeval now;
|
||||
|
@ -223,7 +218,6 @@ void fpm_request_finished() /* {{{ */
|
|||
proc->tv = now;
|
||||
fpm_scoreboard_proc_release(proc);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
void fpm_request_check_timed_out(struct fpm_child_s *child, struct timeval *now, int terminate_timeout, int slowlog_timeout, int track_finished) /* {{{ */
|
||||
{
|
||||
|
|
|
@ -4,17 +4,17 @@
|
|||
#define FPM_REQUEST_H 1
|
||||
|
||||
/* hanging in accept() */
|
||||
void fpm_request_accepting();
|
||||
void fpm_request_accepting(void);
|
||||
/* start reading fastcgi request from very first byte */
|
||||
void fpm_request_reading_headers();
|
||||
void fpm_request_reading_headers(void);
|
||||
/* not a stage really but a point in the php code, where all request params have become known to sapi */
|
||||
void fpm_request_info();
|
||||
void fpm_request_info(void);
|
||||
/* the script is executing */
|
||||
void fpm_request_executing();
|
||||
void fpm_request_executing(void);
|
||||
/* request ended: script response have been sent to web server */
|
||||
void fpm_request_end(void);
|
||||
/* request processed: cleaning current request */
|
||||
void fpm_request_finished();
|
||||
void fpm_request_finished(void);
|
||||
|
||||
struct fpm_child_s;
|
||||
struct timeval;
|
||||
|
|
|
@ -21,7 +21,7 @@ static float fpm_scoreboard_tick;
|
|||
#endif
|
||||
|
||||
|
||||
int fpm_scoreboard_init_main() /* {{{ */
|
||||
int fpm_scoreboard_init_main(void)
|
||||
{
|
||||
struct fpm_worker_pool_s *wp;
|
||||
|
||||
|
@ -72,7 +72,6 @@ int fpm_scoreboard_init_main() /* {{{ */
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static struct fpm_scoreboard_s *fpm_scoreboard_get_for_update(struct fpm_scoreboard_s *scoreboard) /* {{{ */
|
||||
{
|
||||
|
@ -186,11 +185,10 @@ void fpm_scoreboard_update(
|
|||
}
|
||||
/* }}} */
|
||||
|
||||
struct fpm_scoreboard_s *fpm_scoreboard_get() /* {{{*/
|
||||
struct fpm_scoreboard_s *fpm_scoreboard_get(void)
|
||||
{
|
||||
return fpm_scoreboard;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static inline struct fpm_scoreboard_proc_s *fpm_scoreboard_proc_get_ex(
|
||||
struct fpm_scoreboard_s *scoreboard, int child_index, unsigned int nprocs) /* {{{*/
|
||||
|
@ -442,9 +440,8 @@ int fpm_scoreboard_proc_alloc(struct fpm_child_s *child) /* {{{ */
|
|||
/* }}} */
|
||||
|
||||
#ifdef HAVE_TIMES
|
||||
float fpm_scoreboard_get_tick() /* {{{ */
|
||||
float fpm_scoreboard_get_tick(void)
|
||||
{
|
||||
return fpm_scoreboard_tick;
|
||||
}
|
||||
/* }}} */
|
||||
#endif
|
||||
|
|
|
@ -70,14 +70,14 @@ struct fpm_scoreboard_s {
|
|||
struct fpm_scoreboard_proc_s procs[];
|
||||
};
|
||||
|
||||
int fpm_scoreboard_init_main();
|
||||
int fpm_scoreboard_init_main(void);
|
||||
int fpm_scoreboard_init_child(struct fpm_worker_pool_s *wp);
|
||||
|
||||
void fpm_scoreboard_update_begin(struct fpm_scoreboard_s *scoreboard);
|
||||
void fpm_scoreboard_update_commit(int idle, int active, int lq, int lq_len, int requests, int max_children_reached, int slow_rq, int action, struct fpm_scoreboard_s *scoreboard);
|
||||
void fpm_scoreboard_update(int idle, int active, int lq, int lq_len, int requests, int max_children_reached, int slow_rq, int action, struct fpm_scoreboard_s *scoreboard);
|
||||
|
||||
struct fpm_scoreboard_s *fpm_scoreboard_get();
|
||||
struct fpm_scoreboard_s *fpm_scoreboard_get(void);
|
||||
struct fpm_scoreboard_proc_s *fpm_scoreboard_proc_get(struct fpm_scoreboard_s *scoreboard, int child_index);
|
||||
struct fpm_scoreboard_proc_s *fpm_scoreboard_proc_get_from_child(struct fpm_child_s *child);
|
||||
|
||||
|
@ -97,7 +97,7 @@ struct fpm_scoreboard_s *fpm_scoreboard_copy(struct fpm_scoreboard_s *scoreboard
|
|||
void fpm_scoreboard_free_copy(struct fpm_scoreboard_s *scoreboard);
|
||||
|
||||
#ifdef HAVE_TIMES
|
||||
float fpm_scoreboard_get_tick();
|
||||
float fpm_scoreboard_get_tick(void);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -60,8 +60,7 @@ int fpm_shm_free(void *mem, size_t size) /* {{{ */
|
|||
}
|
||||
/* }}} */
|
||||
|
||||
size_t fpm_shm_get_size_allocated() /* {{{*/
|
||||
size_t fpm_shm_get_size_allocated(void)
|
||||
{
|
||||
return fpm_shm_size;
|
||||
}
|
||||
/* }}} */
|
||||
|
|
|
@ -5,6 +5,6 @@
|
|||
|
||||
void *fpm_shm_alloc(size_t size);
|
||||
int fpm_shm_free(void *mem, size_t size);
|
||||
size_t fpm_shm_get_size_allocated();
|
||||
size_t fpm_shm_get_size_allocated(void);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -182,7 +182,7 @@ static void sig_handler(int signo) /* {{{ */
|
|||
}
|
||||
/* }}} */
|
||||
|
||||
int fpm_signals_init_main() /* {{{ */
|
||||
int fpm_signals_init_main(void)
|
||||
{
|
||||
struct sigaction act;
|
||||
|
||||
|
@ -222,9 +222,8 @@ int fpm_signals_init_main() /* {{{ */
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
int fpm_signals_init_child() /* {{{ */
|
||||
int fpm_signals_init_child(void)
|
||||
{
|
||||
struct sigaction act, act_dfl;
|
||||
|
||||
|
@ -257,15 +256,13 @@ int fpm_signals_init_child() /* {{{ */
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
int fpm_signals_get_fd() /* {{{ */
|
||||
int fpm_signals_get_fd(void)
|
||||
{
|
||||
return sp[0];
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
int fpm_signals_init_mask() /* {{{ */
|
||||
int fpm_signals_init_mask(void)
|
||||
{
|
||||
/* Subset of signals from fpm_signals_init_main() and fpm_got_signal()
|
||||
blocked to avoid unexpected death during early init
|
||||
|
@ -298,9 +295,8 @@ int fpm_signals_init_mask() /* {{{ */
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
int fpm_signals_block() /* {{{ */
|
||||
int fpm_signals_block(void)
|
||||
{
|
||||
if (0 > sigprocmask(SIG_BLOCK, &block_sigset, NULL)) {
|
||||
zlog(ZLOG_SYSERROR, "failed to block signals");
|
||||
|
@ -308,9 +304,8 @@ int fpm_signals_block() /* {{{ */
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
int fpm_signals_child_block() /* {{{ */
|
||||
int fpm_signals_child_block(void)
|
||||
{
|
||||
if (0 > sigprocmask(SIG_BLOCK, &child_block_sigset, NULL)) {
|
||||
zlog(ZLOG_SYSERROR, "failed to block child signals");
|
||||
|
@ -318,9 +313,8 @@ int fpm_signals_child_block() /* {{{ */
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
int fpm_signals_unblock() /* {{{ */
|
||||
int fpm_signals_unblock(void)
|
||||
{
|
||||
/* Ensure that during reload after upgrade all signals are unblocked.
|
||||
block_sigset could have different value before execve() */
|
||||
|
@ -332,4 +326,3 @@ int fpm_signals_unblock() /* {{{ */
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
/* }}} */
|
||||
|
|
|
@ -5,13 +5,13 @@
|
|||
|
||||
#include <signal.h>
|
||||
|
||||
int fpm_signals_init_main();
|
||||
int fpm_signals_init_child();
|
||||
int fpm_signals_get_fd();
|
||||
int fpm_signals_init_mask();
|
||||
int fpm_signals_block();
|
||||
int fpm_signals_child_block();
|
||||
int fpm_signals_unblock();
|
||||
int fpm_signals_init_main(void);
|
||||
int fpm_signals_init_child(void);
|
||||
int fpm_signals_get_fd(void);
|
||||
int fpm_signals_init_mask(void);
|
||||
int fpm_signals_block(void);
|
||||
int fpm_signals_child_block(void);
|
||||
int fpm_signals_unblock(void);
|
||||
|
||||
extern const char *fpm_signal_names[NSIG + 1];
|
||||
|
||||
|
|
|
@ -386,7 +386,7 @@ static int fpm_socket_af_unix_listening_socket(struct fpm_worker_pool_s *wp) /*
|
|||
}
|
||||
/* }}} */
|
||||
|
||||
int fpm_sockets_init_main() /* {{{ */
|
||||
int fpm_sockets_init_main(void)
|
||||
{
|
||||
unsigned i, lq_len;
|
||||
struct fpm_worker_pool_s *wp;
|
||||
|
@ -485,7 +485,6 @@ int fpm_sockets_init_main() /* {{{ */
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
#if HAVE_FPM_LQ
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
#define FPM_ENV_SOCKET_SET_SIZE 128
|
||||
|
||||
enum fpm_address_domain fpm_sockets_domain_from_address(char *addr);
|
||||
int fpm_sockets_init_main();
|
||||
int fpm_sockets_init_main(void);
|
||||
int fpm_socket_get_listening_queue(int sock, unsigned *cur_lq, unsigned *max_lq);
|
||||
int fpm_socket_unix_test_connect(struct sockaddr_un *sock, size_t socklen);
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
static int fd_stdout[2];
|
||||
static int fd_stderr[2];
|
||||
|
||||
int fpm_stdio_init_main() /* {{{ */
|
||||
int fpm_stdio_init_main(void)
|
||||
{
|
||||
int fd = open("/dev/null", O_RDWR);
|
||||
|
||||
|
@ -39,9 +39,8 @@ int fpm_stdio_init_main() /* {{{ */
|
|||
close(fd);
|
||||
return 0;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static inline int fpm_use_error_log() { /* {{{ */
|
||||
static inline int fpm_use_error_log(void) {
|
||||
/*
|
||||
* the error_log is NOT used when running in foreground
|
||||
* and from a tty (user looking at output).
|
||||
|
@ -59,8 +58,7 @@ static inline int fpm_use_error_log() { /* {{{ */
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* }}} */
|
||||
int fpm_stdio_init_final() /* {{{ */
|
||||
int fpm_stdio_init_final(void)
|
||||
{
|
||||
if (fpm_use_error_log()) {
|
||||
/* prevent duping if logging to syslog */
|
||||
|
@ -82,7 +80,6 @@ int fpm_stdio_init_final() /* {{{ */
|
|||
zlog_set_launched();
|
||||
return 0;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
int fpm_stdio_init_child(struct fpm_worker_pool_s *wp) /* {{{ */
|
||||
{
|
||||
|
@ -108,11 +105,10 @@ int fpm_stdio_init_child(struct fpm_worker_pool_s *wp) /* {{{ */
|
|||
|
||||
#define FPM_STDIO_CMD_FLUSH "\0fscf"
|
||||
|
||||
int fpm_stdio_flush_child() /* {{{ */
|
||||
int fpm_stdio_flush_child(void)
|
||||
{
|
||||
return write(STDERR_FILENO, FPM_STDIO_CMD_FLUSH, sizeof(FPM_STDIO_CMD_FLUSH));
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static void fpm_stdio_child_said(struct fpm_event_s *ev, short which, void *arg) /* {{{ */
|
||||
{
|
||||
|
|
|
@ -7,10 +7,10 @@
|
|||
|
||||
#define STREAM_SET_MSG_PREFIX_FMT "[pool %s] child %d said into %s: "
|
||||
|
||||
int fpm_stdio_init_main();
|
||||
int fpm_stdio_init_final();
|
||||
int fpm_stdio_init_main(void);
|
||||
int fpm_stdio_init_final(void);
|
||||
int fpm_stdio_init_child(struct fpm_worker_pool_s *wp);
|
||||
int fpm_stdio_flush_child();
|
||||
int fpm_stdio_flush_child(void);
|
||||
int fpm_stdio_prepare_pipes(struct fpm_child_s *child);
|
||||
void fpm_stdio_child_use_pipes(struct fpm_child_s *child);
|
||||
int fpm_stdio_parent_use_pipes(struct fpm_child_s *child);
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#include "fpm_systemd.h"
|
||||
|
||||
|
||||
static void fpm_systemd() /* {{{ */
|
||||
static void fpm_systemd(void)
|
||||
{
|
||||
static unsigned long int last=0;
|
||||
struct fpm_worker_pool_s *wp;
|
||||
|
@ -43,7 +43,6 @@ static void fpm_systemd() /* {{{ */
|
|||
|
||||
last = requests;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
void fpm_systemd_heartbeat(struct fpm_event_s *ev, short which, void *arg) /* {{{ */
|
||||
{
|
||||
|
@ -79,7 +78,7 @@ void fpm_systemd_heartbeat(struct fpm_event_s *ev, short which, void *arg) /* {{
|
|||
}
|
||||
/* }}} */
|
||||
|
||||
int fpm_systemd_conf() /* {{{ */
|
||||
int fpm_systemd_conf(void)
|
||||
{
|
||||
char *watchdog;
|
||||
int interval = 0;
|
||||
|
@ -109,4 +108,3 @@ int fpm_systemd_conf() /* {{{ */
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
/* }}} */
|
||||
|
|
|
@ -7,6 +7,6 @@
|
|||
#define FPM_SYSTEMD_DEFAULT_HEARTBEAT (10000)
|
||||
|
||||
void fpm_systemd_heartbeat(struct fpm_event_s *ev, short which, void *arg);
|
||||
int fpm_systemd_conf();
|
||||
int fpm_systemd_conf(void);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -18,7 +18,7 @@ static vm_offset_t target_page_base;
|
|||
static vm_offset_t local_page;
|
||||
static mach_msg_type_number_t local_size;
|
||||
|
||||
static void fpm_mach_vm_deallocate() /* {{{ */
|
||||
static void fpm_mach_vm_deallocate(void)
|
||||
{
|
||||
if (local_page) {
|
||||
mach_vm_deallocate(mach_task_self(), local_page, local_size);
|
||||
|
@ -27,7 +27,6 @@ static void fpm_mach_vm_deallocate() /* {{{ */
|
|||
local_size = 0;
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
static int fpm_mach_vm_read_page(vm_offset_t page) /* {{{ */
|
||||
{
|
||||
|
|
|
@ -452,7 +452,7 @@ int fpm_unix_init_child(struct fpm_worker_pool_s *wp) /* {{{ */
|
|||
}
|
||||
/* }}} */
|
||||
|
||||
int fpm_unix_init_main() /* {{{ */
|
||||
int fpm_unix_init_main(void)
|
||||
{
|
||||
struct fpm_worker_pool_s *wp;
|
||||
int is_root = !geteuid();
|
||||
|
@ -589,4 +589,3 @@ int fpm_unix_init_main() /* {{{ */
|
|||
|
||||
return 0;
|
||||
}
|
||||
/* }}} */
|
||||
|
|
|
@ -10,7 +10,7 @@ int fpm_unix_set_socket_premissions(struct fpm_worker_pool_s *wp, const char *pa
|
|||
int fpm_unix_free_socket_premissions(struct fpm_worker_pool_s *wp);
|
||||
|
||||
int fpm_unix_init_child(struct fpm_worker_pool_s *wp);
|
||||
int fpm_unix_init_main();
|
||||
int fpm_unix_init_main(void);
|
||||
|
||||
extern size_t fpm_pagesize;
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ static void fpm_worker_pool_cleanup(int which, void *arg) /* {{{ */
|
|||
}
|
||||
/* }}} */
|
||||
|
||||
struct fpm_worker_pool_s *fpm_worker_pool_alloc() /* {{{ */
|
||||
struct fpm_worker_pool_s *fpm_worker_pool_alloc(void)
|
||||
{
|
||||
struct fpm_worker_pool_s *ret;
|
||||
|
||||
|
@ -77,13 +77,11 @@ struct fpm_worker_pool_s *fpm_worker_pool_alloc() /* {{{ */
|
|||
ret->log_fd = -1;
|
||||
return ret;
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
int fpm_worker_pool_init_main() /* {{{ */
|
||||
int fpm_worker_pool_init_main(void)
|
||||
{
|
||||
if (0 > fpm_cleanup_add(FPM_CLEANUP_ALL, fpm_worker_pool_cleanup, 0)) {
|
||||
return -1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
/* }}} */
|
||||
|
|
|
@ -47,9 +47,9 @@ struct fpm_worker_pool_s {
|
|||
#endif
|
||||
};
|
||||
|
||||
struct fpm_worker_pool_s *fpm_worker_pool_alloc();
|
||||
struct fpm_worker_pool_s *fpm_worker_pool_alloc(void);
|
||||
void fpm_worker_pool_free(struct fpm_worker_pool_s *wp);
|
||||
int fpm_worker_pool_init_main();
|
||||
int fpm_worker_pool_init_main(void);
|
||||
|
||||
void fpm_worker_pool_free_limit_extensions(char **limit_extensions);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue