mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-24 13:42:16 +00:00
d26c9f9465
If a new process is started with -sf and it fails to bind, it may send a SIGTTOU to the master process in hope that it will temporarily unbind. Unfortunately this one doesn't catch it and stops to background instead of forwarding the signal to the workers. The same is true for SIGTTIN. This commit simply implements an extra signal handler for the master to deal with such signals that must be passed down to the workers. It must be backported as far as 1.8, though there the code differs in that it's entirely in haproxy.c and doesn't require an extra sig handler.
43 lines
1.0 KiB
C
43 lines
1.0 KiB
C
/*
|
|
* Master Worker
|
|
*
|
|
* Copyright HAProxy Technologies 2019 - William Lallemand <wlallemand@haproxy.com>
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of the GNU General Public License
|
|
* as published by the Free Software Foundation; either version
|
|
* 2 of the License, or (at your option) any later version.
|
|
*
|
|
*/
|
|
|
|
#ifndef PROTO_MWORKER_H_
|
|
#define PROTO_MWORKER_H_
|
|
|
|
#include <types/signal.h>
|
|
|
|
void mworker_proc_list_to_env();
|
|
void mworker_env_to_proc_list();
|
|
|
|
|
|
void mworker_block_signals();
|
|
void mworker_unblock_signals();
|
|
|
|
void mworker_broadcast_signal(struct sig_handler *sh);
|
|
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_cleanlisteners();
|
|
|
|
int mworker_child_nb();
|
|
|
|
int mworker_ext_launch_all();
|
|
|
|
void mworker_kill_max_reloads(int sig);
|
|
|
|
void mworker_free_child(struct mworker_proc *);
|
|
|
|
#endif /* PROTO_MWORKER_H_ */
|