php-internal-docs 8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
fpm_sockets.c
Go to the documentation of this file.
1 /* (c) 2007,2008 Andrei Nigmatulin */
2
3#include "fpm_config.h"
4
5#ifdef HAVE_ALLOCA_H
6#include <alloca.h>
7#endif
8#include <sys/types.h>
9#include <sys/stat.h> /* for chmod(2) */
10#include <sys/socket.h>
11#include <netinet/in.h>
12#include <arpa/inet.h>
13#include <sys/un.h>
14#include <netdb.h>
15#include <stdio.h>
16#include <stdlib.h>
17#include <string.h>
18#include <errno.h>
19#include <unistd.h>
20
21#include "zlog.h"
22#include "fpm_arrays.h"
23#include "fpm_sockets.h"
24#include "fpm_worker_pool.h"
25#include "fpm_unix.h"
26#include "fpm_str.h"
27#include "fpm_env.h"
28#include "fpm_cleanup.h"
29#include "fpm_scoreboard.h"
30
33 int sock;
34 int type;
35 char *key;
36};
37
38static struct fpm_array_s sockets_list;
39
41
42#ifdef SO_SETFIB
43static int routemax = -1;
44#endif
45
46static inline void fpm_sockets_get_env_name(char *envname, size_t envname_length, unsigned idx) /* {{{ */
47{
48 if (!idx) {
49 strcpy(envname, "FPM_SOCKETS");
50 } else {
51 snprintf(envname, envname_length, "FPM_SOCKETS_%d", idx);
52 }
53}
54/* }}} */
55
56static void fpm_sockets_cleanup(int which, void *arg) /* {{{ */
57{
58 unsigned i;
59 unsigned socket_set_count = 0;
60 unsigned socket_set[FPM_ENV_SOCKET_SET_MAX];
61 unsigned socket_set_buf = 0;
62 char envname[32];
63 char *env_value = 0;
64 int p = 0;
65 struct listening_socket_s *ls = sockets_list.data;
66
67 for (i = 0; i < sockets_list.used; i++, ls++) {
68 if (which != FPM_CLEANUP_PARENT_EXEC) {
69 close(ls->sock);
70 } else { /* on PARENT EXEC we want socket fds to be inherited through environment variable */
71 char fd[32];
72 char *tmpenv_value;
73 snprintf(fd, sizeof(fd), "%d", ls->sock);
74
75 socket_set_buf = (i % FPM_ENV_SOCKET_SET_SIZE == 0 && i) ? 1 : 0;
76 tmpenv_value = realloc(env_value, p + (p ? 1 : 0) + strlen(ls->key) + 1 + strlen(fd) + socket_set_buf + 1);
77 if (!tmpenv_value) {
78 zlog(ZLOG_SYSERROR, "failure to inherit data on parent exec for socket `%s` due to memory allocation failure", ls->key);
79 free(ls->key);
80 break;
81 }
82
83 env_value = tmpenv_value;
84
85 if (i % FPM_ENV_SOCKET_SET_SIZE == 0) {
86 socket_set[socket_set_count] = p + socket_set_buf;
87 socket_set_count++;
88 if (i) {
89 *(env_value + p + 1) = 0;
90 }
91 }
92
93 p += sprintf(env_value + p + socket_set_buf, "%s%s=%s", (p && !socket_set_buf) ? "," : "", ls->key, fd);
94 p += socket_set_buf;
95 }
96
97 if (which == FPM_CLEANUP_PARENT_EXIT_MAIN) {
98 if (ls->type == FPM_AF_UNIX) {
99 unlink(ls->key);
100 }
101 }
102 free(ls->key);
103 }
104
105 if (env_value) {
106 for (i = 0; i < socket_set_count; i++) {
107 fpm_sockets_get_env_name(envname, sizeof(envname), i);
108 setenv(envname, env_value + socket_set[i], 1);
109 }
110 fpm_sockets_get_env_name(envname, sizeof(envname), socket_set_count);
111 unsetenv(envname);
112 free(env_value);
113 }
114
115 fpm_array_free(&sockets_list);
116}
117/* }}} */
118
119static void *fpm_get_in_addr(struct sockaddr *sa) /* {{{ */
120{
121 if (sa->sa_family == AF_INET) {
122 return &(((struct sockaddr_in*)sa)->sin_addr);
123 }
124
125 return &(((struct sockaddr_in6*)sa)->sin6_addr);
126}
127/* }}} */
128
129static int fpm_get_in_port(struct sockaddr *sa) /* {{{ */
130{
131 if (sa->sa_family == AF_INET) {
132 return ntohs(((struct sockaddr_in*)sa)->sin_port);
133 }
134
135 return ntohs(((struct sockaddr_in6*)sa)->sin6_port);
136}
137/* }}} */
138
139static int fpm_sockets_hash_op(int sock, struct sockaddr *sa, char *key, int type, int op) /* {{{ */
140{
141 if (key == NULL) {
142 switch (type) {
143 case FPM_AF_INET : {
144 key = alloca(INET6_ADDRSTRLEN+10);
145 inet_ntop(sa->sa_family, fpm_get_in_addr(sa), key, INET6_ADDRSTRLEN);
146 size_t key_length = strlen(key);
147 snprintf(key + key_length, INET6_ADDRSTRLEN + 10 - key_length, ":%d", fpm_get_in_port(sa));
148 break;
149 }
150
151 case FPM_AF_UNIX : {
152 struct sockaddr_un *sa_un = (struct sockaddr_un *) sa;
153 key = alloca(strlen(sa_un->sun_path) + 1);
154 strcpy(key, sa_un->sun_path);
155 break;
156 }
157
158 default :
159 return -1;
160 }
161 }
162
163 switch (op) {
164
165 case FPM_GET_USE_SOCKET :
166 {
167 unsigned i;
168 struct listening_socket_s *ls = sockets_list.data;
169
170 for (i = 0; i < sockets_list.used; i++, ls++) {
171 if (!strcmp(ls->key, key)) {
172 ++ls->refcount;
173 return ls->sock;
174 }
175 }
176 break;
177 }
178
179 case FPM_STORE_SOCKET : /* inherited socket */
180 case FPM_STORE_USE_SOCKET : /* just created */
181 {
182 struct listening_socket_s *ls;
183
184 ls = fpm_array_push(&sockets_list);
185 if (!ls) {
186 break;
187 }
188
189 if (op == FPM_STORE_SOCKET) {
190 ls->refcount = 0;
191 } else {
192 ls->refcount = 1;
193 }
194 ls->type = type;
195 ls->sock = sock;
196 ls->key = strdup(key);
197
198 return 0;
199 }
200 }
201 return -1;
202}
203/* }}} */
204
205static int fpm_sockets_new_listening_socket(struct fpm_worker_pool_s *wp, struct sockaddr *sa, int socklen) /* {{{ */
206{
207 int flags = 1;
208 int sock;
209 mode_t saved_umask = 0;
210
211 sock = socket(sa->sa_family, SOCK_STREAM, 0);
212
213 if (0 > sock) {
214 zlog(ZLOG_SYSERROR, "failed to create new listening socket: socket()");
215 return -1;
216 }
217
218 if (0 > setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &flags, sizeof(flags))) {
219 zlog(ZLOG_WARNING, "failed to change socket attribute");
220 }
221
223 if (fpm_socket_unix_test_connect((struct sockaddr_un *)sa, socklen) == 0) {
224 zlog(ZLOG_ERROR, "Another FPM instance seems to already listen on %s", ((struct sockaddr_un *) sa)->sun_path);
225 close(sock);
226 return -1;
227 }
228 unlink( ((struct sockaddr_un *) sa)->sun_path);
229 saved_umask = umask(0777 ^ wp->socket_mode);
230 }
231
232 if (0 > bind(sock, sa, socklen)) {
233 zlog(ZLOG_SYSERROR, "unable to bind listening socket for address '%s'", wp->config->listen_address);
235 umask(saved_umask);
236 }
237 close(sock);
238 return -1;
239 }
240
242 char *path = ((struct sockaddr_un *) sa)->sun_path;
243
244 umask(saved_umask);
245
246 if (0 > fpm_unix_set_socket_permissions(wp, path)) {
247 close(sock);
248 return -1;
249 }
250 }
251
252 if (0 > listen(sock, wp->config->listen_backlog)) {
253 zlog(ZLOG_SYSERROR, "failed to listen to address '%s'", wp->config->listen_address);
254 close(sock);
255 return -1;
256 }
257
258#ifdef SO_SETFIB
259 if (-1 < wp->config->listen_setfib) {
260 if (routemax < wp->config->listen_setfib) {
261 zlog(ZLOG_ERROR, "Invalid routing table id %d, max is %d", wp->config->listen_setfib, routemax);
262 close(sock);
263 return -1;
264 }
265
266 if (0 > setsockopt(sock, SOL_SOCKET, SO_SETFIB, &wp->config->listen_setfib, sizeof(wp->config->listen_setfib))) {
267 zlog(ZLOG_WARNING, "failed to change socket SO_SETFIB attribute");
268 }
269 }
270#endif
271
272 return sock;
273}
274/* }}} */
275
276static int fpm_sockets_get_listening_socket(struct fpm_worker_pool_s *wp, struct sockaddr *sa, int socklen) /* {{{ */
277{
278 int sock;
279
280 sock = fpm_sockets_hash_op(0, sa, 0, wp->listen_address_domain, FPM_GET_USE_SOCKET);
281 if (sock >= 0) {
282 return sock;
283 }
284
285 sock = fpm_sockets_new_listening_socket(wp, sa, socklen);
286 fpm_sockets_hash_op(sock, sa, 0, wp->listen_address_domain, FPM_STORE_USE_SOCKET);
287
288 return sock;
289}
290/* }}} */
291
293{
294 if (strchr(address, ':')) {
295 return FPM_AF_INET;
296 }
297
298 if (strlen(address) == strspn(address, "0123456789")) {
299 return FPM_AF_INET;
300 }
301 return FPM_AF_UNIX;
302}
303/* }}} */
304
305static int fpm_socket_af_inet_socket_by_addr(struct fpm_worker_pool_s *wp, const char *addr, const char *port) /* {{{ */
306{
307 struct addrinfo hints, *servinfo, *p;
308 char tmpbuf[INET6_ADDRSTRLEN];
309 int status;
310 int sock = -1;
311
312 memset(&hints, 0, sizeof hints);
313 hints.ai_family = AF_UNSPEC;
314 hints.ai_socktype = SOCK_STREAM;
315
316 if ((status = getaddrinfo(addr, port, &hints, &servinfo)) != 0) {
317 zlog(ZLOG_ERROR, "getaddrinfo: %s", gai_strerror(status));
318 return -1;
319 }
320
321 for (p = servinfo; p != NULL; p = p->ai_next) {
322 inet_ntop(p->ai_family, fpm_get_in_addr(p->ai_addr), tmpbuf, INET6_ADDRSTRLEN);
323 if (sock < 0) {
324 if ((sock = fpm_sockets_get_listening_socket(wp, p->ai_addr, p->ai_addrlen)) != -1) {
325 zlog(ZLOG_DEBUG, "Found address for %s, socket opened on %s", addr, tmpbuf);
326 }
327 } else {
328 zlog(ZLOG_WARNING, "Found multiple addresses for %s, %s ignored", addr, tmpbuf);
329 }
330 }
331
332 freeaddrinfo(servinfo);
333
334 return sock;
335}
336/* }}} */
337
338static int fpm_socket_af_inet_listening_socket(struct fpm_worker_pool_s *wp) /* {{{ */
339{
340 char *dup_address = strdup(wp->config->listen_address);
341 char *port_str = strrchr(dup_address, ':');
342 char *addr = NULL;
343 int addr_len;
344 int port = 0;
345 int sock = -1;
346
347 if (port_str) { /* this is host:port pair */
348 *port_str++ = '\0';
349 port = atoi(port_str);
350 addr = dup_address;
351
352 /* strip brackets from address for getaddrinfo */
353 addr_len = strlen(addr);
354 if (addr[0] == '[' && addr[addr_len - 1] == ']') {
355 addr[addr_len - 1] = '\0';
356 addr++;
357 }
358
359 } else if (strlen(dup_address) == strspn(dup_address, "0123456789")) { /* this is port */
360 port = atoi(dup_address);
361 port_str = dup_address;
362 }
363
364 if (port < 1 || port > 65535) {
365 zlog(ZLOG_ERROR, "invalid port value '%s'", port_str);
366 free(dup_address);
367 return -1;
368 }
369
370 if (addr) {
371 /* Bind a specific address */
372 sock = fpm_socket_af_inet_socket_by_addr(wp, addr, port_str);
373 } else {
374 /* Bind ANYADDR
375 *
376 * Try "::" first as that covers IPv6 ANYADDR and mapped IPv4 ANYADDR
377 * silencing warnings since failure is an option
378 *
379 * If that fails (because AF_INET6 is unsupported) retry with 0.0.0.0
380 */
381 int old_level = zlog_set_level(ZLOG_ALERT);
382 sock = fpm_socket_af_inet_socket_by_addr(wp, "::", port_str);
383 zlog_set_level(old_level);
384
385 if (sock < 0) {
386 zlog(ZLOG_NOTICE, "Failed implicitly binding to ::, retrying with 0.0.0.0");
387 sock = fpm_socket_af_inet_socket_by_addr(wp, "0.0.0.0", port_str);
388 }
389 }
390
391 free(dup_address);
392
393 return sock;
394}
395/* }}} */
396
397static int fpm_socket_af_unix_listening_socket(struct fpm_worker_pool_s *wp) /* {{{ */
398{
399 struct sockaddr_un sa_un;
400 size_t socket_length = sizeof(sa_un.sun_path);
401 size_t address_length = strlen(wp->config->listen_address);
402
403 memset(&sa_un, 0, sizeof(sa_un));
404 strlcpy(sa_un.sun_path, wp->config->listen_address, socket_length);
405
406 if (address_length >= socket_length) {
407 zlog(
409 "[pool %s] cannot bind to UNIX socket '%s' as path is too long (found length: %zu, "
410 "maximal length: %zu), trying cut socket path instead '%s'",
411 wp->config->name,
413 address_length,
414 socket_length,
415 sa_un.sun_path
416 );
417 }
418
419 sa_un.sun_family = AF_UNIX;
420 return fpm_sockets_get_listening_socket(wp, (struct sockaddr *) &sa_un, sizeof(struct sockaddr_un));
421}
422/* }}} */
423
424#ifdef SO_SETFIB
425static zend_result fpm_socket_setfib_init(void)
426{
427 /* potentially up to 65536 but needs to check the actual cap beforehand */
428 size_t len = sizeof(routemax);
429 if (sysctlbyname("net.fibs", &routemax, &len, NULL, 0) < 0) {
430 zlog(ZLOG_ERROR, "failed to get max routing table");
431 return FAILURE;
432 }
433
434 return SUCCESS;
435}
436#endif
437
439{
440 unsigned i, lq_len;
441 struct fpm_worker_pool_s *wp;
442 char envname[32];
443 char sockpath[256];
444 char *inherited;
445 struct listening_socket_s *ls;
446
447 if (0 == fpm_array_init(&sockets_list, sizeof(struct listening_socket_s), 10)) {
448 return -1;
449 }
450
451#ifdef SO_SETFIB
452 if (fpm_socket_setfib_init() == FAILURE) {
453 return -1;
454 }
455#endif
456
457 /* import inherited sockets */
458 for (i = 0; i < FPM_ENV_SOCKET_SET_MAX; i++) {
459 fpm_sockets_get_env_name(envname, sizeof(envname), i);
460 inherited = getenv(envname);
461 if (!inherited) {
462 break;
463 }
464
465 while (inherited && *inherited) {
466 char *comma = strchr(inherited, ',');
467 int type, fd_no;
468 char *eq;
469
470 if (comma) {
471 *comma = '\0';
472 }
473
474 eq = strchr(inherited, '=');
475 if (eq) {
476 int sockpath_len = eq - inherited;
477 if (sockpath_len > 255) {
478 /* this should never happen as UDS limit is lower */
479 sockpath_len = 255;
480 }
481 memcpy(sockpath, inherited, sockpath_len);
482 sockpath[sockpath_len] = '\0';
483 fd_no = atoi(eq + 1);
485 zlog(ZLOG_NOTICE, "using inherited socket fd=%d, \"%s\"", fd_no, sockpath);
486 fpm_sockets_hash_op(fd_no, 0, sockpath, type, FPM_STORE_SOCKET);
487 }
488
489 if (comma) {
490 inherited = comma + 1;
491 } else {
492 inherited = 0;
493 }
494 }
495 }
496
497 /* create all required sockets */
498 for (wp = fpm_worker_all_pools; wp; wp = wp->next) {
499 switch (wp->listen_address_domain) {
500 case FPM_AF_INET :
501 wp->listening_socket = fpm_socket_af_inet_listening_socket(wp);
502 break;
503
504 case FPM_AF_UNIX :
506 return -1;
507 }
508 wp->listening_socket = fpm_socket_af_unix_listening_socket(wp);
509 break;
510 }
511
512 if (wp->listening_socket == -1) {
513 return -1;
514 }
515
517 fpm_scoreboard_update(-1, -1, -1, (int)lq_len, -1, -1, 0, 0, FPM_SCOREBOARD_ACTION_SET, wp->scoreboard);
518 }
519 }
520
521 /* close unused sockets that was inherited */
522 ls = sockets_list.data;
523
524 for (i = 0; i < sockets_list.used; ) {
525 if (ls->refcount == 0) {
526 close(ls->sock);
527 if (ls->type == FPM_AF_UNIX) {
528 unlink(ls->key);
529 }
530 free(ls->key);
531 fpm_array_item_remove(&sockets_list, i);
532 } else {
533 ++i;
534 ++ls;
535 }
536 }
537
538 if (0 > fpm_cleanup_add(FPM_CLEANUP_ALL, fpm_sockets_cleanup, 0)) {
539 return -1;
540 }
541 return 0;
542}
543
544#if HAVE_FPM_LQ
545
546#ifdef HAVE_LQ_TCP_INFO
547
548#include <netinet/tcp.h>
549
550int fpm_socket_get_listening_queue(int sock, unsigned *cur_lq, unsigned *max_lq)
551{
552 struct tcp_info info;
553 socklen_t len = sizeof(info);
554
555 if (0 > getsockopt(sock, IPPROTO_TCP, TCP_INFO, &info, &len)) {
556 zlog(ZLOG_SYSERROR, "failed to retrieve TCP_INFO for socket");
557 return -1;
558 }
559#if defined(__FreeBSD__) || defined(__NetBSD__)
560 if (info.__tcpi_sacked == 0) {
561 return -1;
562 }
563
564 if (cur_lq) {
565 *cur_lq = info.__tcpi_unacked;
566 }
567
568 if (max_lq) {
569 *max_lq = info.__tcpi_sacked;
570 }
571#else
572 /* kernel >= 2.6.24 return non-zero here, that means operation is supported */
573 if (info.tcpi_sacked == 0) {
574 return -1;
575 }
576
577 if (cur_lq) {
578 *cur_lq = info.tcpi_unacked;
579 }
580
581 if (max_lq) {
582 *max_lq = info.tcpi_sacked;
583 }
584#endif
585
586 return 0;
587}
588
589#elif defined(HAVE_LQ_TCP_CONNECTION_INFO)
590
591#include <netinet/tcp.h>
592
593int fpm_socket_get_listening_queue(int sock, unsigned *cur_lq, unsigned *max_lq)
594{
595 struct tcp_connection_info info;
596 socklen_t len = sizeof(info);
597
598 if (0 > getsockopt(sock, IPPROTO_TCP, TCP_CONNECTION_INFO, &info, &len)) {
599 zlog(ZLOG_SYSERROR, "failed to retrieve TCP_CONNECTION_INFO for socket");
600 return -1;
601 }
602
603 if (cur_lq) {
604 *cur_lq = info.tcpi_tfo_syn_data_acked;
605 }
606
607 if (max_lq) {
608 *max_lq = 0;
609 }
610
611 return 0;
612}
613
614#elif defined(HAVE_LQ_SO_LISTENQ)
615
616int fpm_socket_get_listening_queue(int sock, unsigned *cur_lq, unsigned *max_lq)
617{
618 int val;
619 socklen_t len = sizeof(val);
620
621 if (cur_lq) {
622 if (0 > getsockopt(sock, SOL_SOCKET, SO_LISTENQLEN, &val, &len)) {
623 return -1;
624 }
625
626 *cur_lq = val;
627 }
628
629 if (max_lq) {
630 if (0 > getsockopt(sock, SOL_SOCKET, SO_LISTENQLIMIT, &val, &len)) {
631 return -1;
632 }
633
634 *max_lq = val;
635 }
636
637 return 0;
638}
639
640#endif
641
642#else
643
644int fpm_socket_get_listening_queue(int sock, unsigned *cur_lq, unsigned *max_lq)
645{
646 return -1;
647}
648
649#endif
650
651int fpm_socket_unix_test_connect(struct sockaddr_un *sock, size_t socklen) /* {{{ */
652{
653 int fd;
654
655 if (!sock || sock->sun_family != AF_UNIX) {
656 return -1;
657 }
658
659 if ((fd = socket(AF_UNIX, SOCK_STREAM, 0)) < 0) {
660 return -1;
661 }
662
663 if (connect(fd, (struct sockaddr *)sock, socklen) == -1) {
664 close(fd);
665 return -1;
666 }
667
668 close(fd);
669 return 0;
670}
671/* }}} */
size_t len
Definition apprentice.c:174
umask(?int $mask=null)
unlink(string $filename, $context=null)
getenv(?string $name=null, bool $local_only=false)
strrchr(string $haystack, string $needle, bool $before_needle=false)
strspn(string $string, string $characters, int $offset=0, ?int $length=null)
strchr(string $haystack, string $needle, bool $before_needle=false)
DNS_STATUS status
Definition dns_win32.c:49
unsigned int socklen_t
Definition fastcgi.c:87
zend_ffi_type * type
Definition ffi.c:3812
memcpy(ptr1, ptr2, size)
zval * arg
Definition ffi.c:3975
memset(ptr, 0, type->size)
zval * val
Definition ffi.c:4262
int fpm_cleanup_add(int type, void(*cleanup)(int, void *), void *arg)
Definition fpm_cleanup.c:18
@ FPM_CLEANUP_PARENT_EXEC
Definition fpm_cleanup.h:13
@ FPM_CLEANUP_PARENT_EXIT_MAIN
Definition fpm_cleanup.h:12
@ FPM_CLEANUP_ALL
Definition fpm_cleanup.h:15
void unsetenv(const char *name)
Definition fpm_env.c:87
int setenv(char *name, char *value, int overwrite)
Definition fpm_env.c:44
void fpm_scoreboard_update(int idle, int active, int lq, int lq_len, int requests, int max_children_reached, int slow_rq, size_t memory_peak, int action, struct fpm_scoreboard_s *scoreboard)
#define FPM_SCOREBOARD_ACTION_SET
int fpm_sockets_init_main(void)
int fpm_socket_get_listening_queue(int sock, unsigned *cur_lq, unsigned *max_lq)
@ FPM_STORE_SOCKET
Definition fpm_sockets.c:40
@ FPM_STORE_USE_SOCKET
Definition fpm_sockets.c:40
@ FPM_GET_USE_SOCKET
Definition fpm_sockets.c:40
enum fpm_address_domain fpm_sockets_domain_from_address(char *address)
int fpm_socket_unix_test_connect(struct sockaddr_un *sock, size_t socklen)
#define FPM_ENV_SOCKET_SET_SIZE
Definition fpm_sockets.h:28
#define FPM_ENV_SOCKET_SET_MAX
Definition fpm_sockets.h:27
int fpm_unix_set_socket_permissions(struct fpm_worker_pool_s *wp, const char *path)
Definition fpm_unix.c:287
int fpm_unix_resolve_socket_permissions(struct fpm_worker_pool_s *wp)
Definition fpm_unix.c:127
struct fpm_worker_pool_s * fpm_worker_all_pools
fpm_address_domain
@ FPM_AF_UNIX
@ FPM_AF_INET
#define NULL
Definition gdcache.h:45
#define SUCCESS
Definition hash_sha3.c:261
sprintf("0x%X", $numelems)
unsigned short mode_t
Definition ioutil.h:72
inet_ntop(AF_INET, addr, addr_str, sizeof(addr_str))
#define strlcpy
Definition php.h:159
unsigned char key[REFLECTION_KEY_LEN]
int fd
Definition phpdbg.h:282
p
Definition session.c:1105
const SOCK_STREAM
const SOL_SOCKET
const AF_INET
const SO_LISTENQLIMIT
const SO_LISTENQLEN
const AF_UNIX
const SO_SETFIB
const SO_REUSEADDR
struct fpm_worker_pool_config_s * config
enum fpm_address_domain listen_address_domain
struct fpm_scoreboard_s * scoreboard
struct fpm_worker_pool_s * next
#define close(a)
strlen(string $string)
strcmp(string $string1, string $string2)
#define snprintf
char * alloca()
@ FAILURE
Definition zend_types.h:61
ZEND_RESULT_CODE zend_result
Definition zend_types.h:64
int zlog_set_level(int new_value)
Definition zlog.c:103
#define ZLOG_SYSERROR
Definition zlog.h:53
@ ZLOG_DEBUG
Definition zlog.h:42
@ ZLOG_ERROR
Definition zlog.h:45
@ ZLOG_ALERT
Definition zlog.h:46
@ ZLOG_NOTICE
Definition zlog.h:43
@ ZLOG_WARNING
Definition zlog.h:44
#define zlog(flags,...)
Definition zlog.h:9