xref: /PHP-7.4/sapi/fpm/fpm/fpm_children.h (revision 1ad08256)
1 	/* (c) 2007,2008 Andrei Nigmatulin */
2 
3 #ifndef FPM_CHILDREN_H
4 #define FPM_CHILDREN_H 1
5 
6 #include <sys/time.h>
7 #include <sys/types.h>
8 
9 #include "fpm_worker_pool.h"
10 #include "fpm_events.h"
11 #include "zlog.h"
12 
13 int fpm_children_create_initial(struct fpm_worker_pool_s *wp);
14 int fpm_children_free(struct fpm_child_s *child);
15 void fpm_children_bury();
16 int fpm_children_init_main();
17 int fpm_children_make(struct fpm_worker_pool_s *wp, int in_event_loop, int nb_to_spawn, int is_debug);
18 
19 struct fpm_child_s;
20 
21 struct fpm_child_s {
22 	struct fpm_child_s *prev, *next;
23 	struct timeval started;
24 	struct fpm_worker_pool_s *wp;
25 	struct fpm_event_s ev_stdout, ev_stderr;
26 	int shm_slot_i;
27 	int fd_stdout, fd_stderr;
28 	void (*tracer)(struct fpm_child_s *);
29 	struct timeval slow_logged;
30 	int idle_kill;
31 	pid_t pid;
32 	int scoreboard_i;
33 	struct zlog_stream *log_stream;
34 };
35 
36 #endif
37