mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-07 23:56:57 +02:00
REORG: global: move rlim_fd_*_at_boot in limits
Let's move in 'limits' compilation unit global variables to keep the initial process fd limits.
This commit is contained in:
parent
47f2afb436
commit
b8dc783eb9
@ -45,8 +45,6 @@ extern char *localpeer;
|
||||
extern unsigned int warned; /* bitfield of a few warnings to emit just once */
|
||||
extern struct list proc_list; /* list of process in mworker mode */
|
||||
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;
|
||||
extern unsigned char boot_seed[20]; // per-boot random seed (160 bits initially)
|
||||
extern THREAD_LOCAL struct buffer trash;
|
||||
|
@ -9,6 +9,9 @@
|
||||
#define _HAPROXY_LIMITS_H
|
||||
#include <sys/resource.h>
|
||||
|
||||
extern unsigned int rlim_fd_cur_at_boot;
|
||||
extern unsigned int rlim_fd_max_at_boot;
|
||||
|
||||
/* handlers to manipulate system resources limits granted by OS to process and
|
||||
* to tie them up with the internal process limits
|
||||
*/
|
||||
|
@ -255,8 +255,6 @@ static char **old_argv = NULL; /* previous argv but cleaned up */
|
||||
struct list proc_list = LIST_HEAD_INIT(proc_list);
|
||||
|
||||
int master = 0; /* 1 if in master, 0 if in child */
|
||||
unsigned int rlim_fd_cur_at_boot = 0;
|
||||
unsigned int rlim_fd_max_at_boot = 0;
|
||||
|
||||
/* per-boot randomness */
|
||||
unsigned char boot_seed[20]; /* per-boot random seed (160 bits initially) */
|
||||
|
@ -11,6 +11,9 @@
|
||||
#include <haproxy/proxy.h>
|
||||
|
||||
|
||||
unsigned int rlim_fd_cur_at_boot = 0;
|
||||
unsigned int rlim_fd_max_at_boot = 0;
|
||||
|
||||
/* Sets the RLIMIT_NOFILE setting to <new_limit> and returns the previous one
|
||||
* in <old_limit> if the pointer is not NULL, even if set_rlimit() fails. The
|
||||
* two pointers may point to the same variable as the copy happens after
|
||||
|
Loading…
Reference in New Issue
Block a user