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 | |
Willy Tarreau | 708c244 | 2019-12-11 14:24:07 +0100 | [diff] [blame] | 25 | void mworker_broadcast_signal(struct sig_handler *sh); |
William Lallemand | e25473c | 2019-04-01 11:29:56 +0200 | [diff] [blame] | 26 | void mworker_catch_sighup(struct sig_handler *sh); |
| 27 | void mworker_catch_sigterm(struct sig_handler *sh); |
| 28 | void mworker_catch_sigchld(struct sig_handler *sh); |
| 29 | |
William Lallemand | 3fa724d | 2019-04-01 11:29:55 +0200 | [diff] [blame] | 30 | void mworker_accept_wrapper(int fd); |
William Lallemand | 3fa724d | 2019-04-01 11:29:55 +0200 | [diff] [blame] | 31 | |
William Lallemand | 9001ce8 | 2019-04-01 11:29:57 +0200 | [diff] [blame] | 32 | void mworker_cleanlisteners(); |
| 33 | |
William Lallemand | 3f12887 | 2019-04-01 11:29:59 +0200 | [diff] [blame] | 34 | int mworker_child_nb(); |
| 35 | |
William Lallemand | 9a1ee7a | 2019-04-01 11:30:02 +0200 | [diff] [blame] | 36 | int mworker_ext_launch_all(); |
| 37 | |
William Lallemand | 27edc4b | 2019-05-07 17:49:33 +0200 | [diff] [blame] | 38 | void mworker_kill_max_reloads(int sig); |
William Lallemand | e25473c | 2019-04-01 11:29:56 +0200 | [diff] [blame] | 39 | |
Tim Duesterhus | 9b7a976 | 2019-05-16 20:23:22 +0200 | [diff] [blame] | 40 | void mworker_free_child(struct mworker_proc *); |
| 41 | |
William Lallemand | 48dfbbd | 2019-04-01 11:29:53 +0200 | [diff] [blame] | 42 | #endif /* PROTO_MWORKER_H_ */ |