xref: /PHP-7.2/sapi/fpm/fpm/fpm_children.h (revision 60a69dae)
1 	/* $Id: fpm_children.h,v 1.9 2008/05/24 17:38:47 anight Exp $ */
2 	/* (c) 2007,2008 Andrei Nigmatulin */
3 
4 #ifndef FPM_CHILDREN_H
5 #define FPM_CHILDREN_H 1
6 
7 #include <sys/time.h>
8 #include <sys/types.h>
9 
10 #include "fpm_worker_pool.h"
11 #include "fpm_events.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 };
34 
35 #endif
36