REORG: mworker: move signal handlers and related functions

Move the following functions to mworker.c:

void mworker_catch_sighup(struct sig_handler *sh);
void mworker_catch_sigterm(struct sig_handler *sh);
void mworker_catch_sigchld(struct sig_handler *sh);

static void mworker_kill(int sig);
int current_child(int pid);
diff --git a/include/proto/mworker.h b/include/proto/mworker.h
index 25d8c8c..becb123 100644
--- a/include/proto/mworker.h
+++ b/include/proto/mworker.h
@@ -13,6 +13,8 @@
 #ifndef PROTO_MWORKER_H_
 #define PROTO_MWORKER_H_
 
+#include <types/signal.h>
+
 void mworker_proc_list_to_env();
 void mworker_env_to_proc_list();
 
@@ -20,7 +22,13 @@
 void mworker_block_signals();
 void mworker_unblock_signals();
 
+void mworker_catch_sighup(struct sig_handler *sh);
+void mworker_catch_sigterm(struct sig_handler *sh);
+void mworker_catch_sigchld(struct sig_handler *sh);
+
 void mworker_accept_wrapper(int fd);
 void mworker_pipe_register();
 
+extern int *children; /* store PIDs of children in master workers mode */
+
 #endif /* PROTO_MWORKER_H_ */
diff --git a/include/types/global.h b/include/types/global.h
index 009814b..6b06e7f 100644
--- a/include/types/global.h
+++ b/include/types/global.h
@@ -224,6 +224,7 @@
 extern int master; /* 1 if in master, 0 otherwise */
 extern unsigned int rlim_fd_cur_at_boot;
 extern unsigned int rlim_fd_max_at_boot;
+extern int atexit_flag;
 
 /* bit values to go with "warned" above */
 #define WARN_BLOCK_DEPRECATED       0x00000001
@@ -254,6 +255,9 @@
 	return mask ? mask : all_threads_mask;
 }
 
+int tell_old_pids(int sig);
+int delete_oldpid(int pid);
+
 void deinit(void);
 void hap_register_build_opts(const char *str, int must_free);
 void hap_register_post_check(int (*fct)());