William Lallemand | 48dfbbd | 2019-04-01 11:29:53 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Master Worker |
| 3 | * |
| 4 | * Copyright HAProxy Technologies 2019 - William Lallemand <wlallemand@haproxy.com> |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or |
| 7 | * modify it under the terms of the GNU General Public License |
| 8 | * as published by the Free Software Foundation; either version |
| 9 | * 2 of the License, or (at your option) any later version. |
| 10 | * |
| 11 | */ |
| 12 | |
| 13 | #ifndef PROTO_MWORKER_H_ |
| 14 | #define PROTO_MWORKER_H_ |
| 15 | |
William Lallemand | e25473c | 2019-04-01 11:29:56 +0200 | [diff] [blame] | 16 | #include <types/signal.h> |
| 17 | |
William Lallemand | 48dfbbd | 2019-04-01 11:29:53 +0200 | [diff] [blame] | 18 | void mworker_proc_list_to_env(); |
| 19 | void mworker_env_to_proc_list(); |
| 20 | |
William Lallemand | 3cd95d2 | 2019-04-01 11:29:54 +0200 | [diff] [blame] | 21 | |
| 22 | void mworker_block_signals(); |
| 23 | void mworker_unblock_signals(); |
| 24 | |
William Lallemand | e25473c | 2019-04-01 11:29:56 +0200 | [diff] [blame] | 25 | void mworker_catch_sighup(struct sig_handler *sh); |
| 26 | void mworker_catch_sigterm(struct sig_handler *sh); |
| 27 | void mworker_catch_sigchld(struct sig_handler *sh); |
| 28 | |
William Lallemand | 3fa724d | 2019-04-01 11:29:55 +0200 | [diff] [blame] | 29 | void mworker_accept_wrapper(int fd); |
William Lallemand | 3fa724d | 2019-04-01 11:29:55 +0200 | [diff] [blame] | 30 | |
William Lallemand | 9001ce8 | 2019-04-01 11:29:57 +0200 | [diff] [blame] | 31 | void mworker_cleanlisteners(); |
| 32 | |
William Lallemand | 3f12887 | 2019-04-01 11:29:59 +0200 | [diff] [blame] | 33 | int mworker_child_nb(); |
| 34 | |
William Lallemand | 9a1ee7a | 2019-04-01 11:30:02 +0200 | [diff] [blame] | 35 | int mworker_ext_launch_all(); |
| 36 | |
William Lallemand | 27edc4b | 2019-05-07 17:49:33 +0200 | [diff] [blame] | 37 | void mworker_kill_max_reloads(int sig); |
William Lallemand | e25473c | 2019-04-01 11:29:56 +0200 | [diff] [blame] | 38 | |
Tim Duesterhus | 9b7a976 | 2019-05-16 20:23:22 +0200 | [diff] [blame] | 39 | void mworker_free_child(struct mworker_proc *); |
| 40 | |
William Lallemand | 48dfbbd | 2019-04-01 11:29:53 +0200 | [diff] [blame] | 41 | #endif /* PROTO_MWORKER_H_ */ |