haproxy/include/proto/mworker.h
Willy Tarreau 619a95f5ad MEDIUM: init/mworker: make the pipe register function a regular initcall
Now that we have the guarantee that init calls happen before any other
thread starts, we don't need anymore the workaround installed by commit
1605c7ae6 ("BUG/MEDIUM: threads/mworker: fix a race on startup") and we
can instead rely on a regular per-thread initcall for this function. It
will only be performed on worker thread #0, the other ones and the master
have nothing to do, just like in the original code that was only moved
to the function.
2019-05-20 11:26:12 +02:00

40 lines
932 B
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_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);
#endif /* PROTO_MWORKER_H_ */