1
2
3
4
5
6
7
8
9
10 #include <crm_internal.h>
11
12 #include <stdint.h>
13
14 typedef struct pcmk_child_s {
15 pid_t pid;
16 int start_seq;
17 int respawn_count;
18 gboolean respawn;
19 const char *name;
20 const char *uid;
21 const char *command;
22 const char *endpoint;
23
24 gboolean active_before_startup;
25 } pcmk_child_t;
26
27 #define SIZEOF(a) (sizeof(a) / sizeof(a[0]))
28 #define MAX_RESPAWN 100
29
30 extern GMainLoop *mainloop;
31 extern struct qb_ipcs_service_handlers mcp_ipc_callbacks;
32 extern const char *pacemakerd_state;
33 extern gboolean running_with_sbd;
34 extern unsigned int shutdown_complete_state_reported_to;
35 extern gboolean shutdown_complete_state_reported_client_closed;
36 extern crm_trigger_t *shutdown_trigger;
37 extern crm_trigger_t *startup_trigger;
38
39 gboolean mcp_read_config(void);
40
41 gboolean cluster_connect_cfg(void);
42 void cluster_disconnect_cfg(void);
43 int find_and_track_existing_processes(void);
44 gboolean init_children_processes(void *user_data);
45 void pcmk_shutdown(int nsig);
46 void pcmk_handle_ping_request(pcmk__client_t *c, xmlNode *msg, uint32_t id);
47 void pcmk_handle_shutdown_request(pcmk__client_t *c, xmlNode *msg, uint32_t id, uint32_t flags);
48 void pcmkd_shutdown_corosync(void);