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