]> git.ipfire.org Git - thirdparty/haproxy.git/commit
REORG: startup: move code that applies limits to limits.c
authorValentine Krasnobaeva <vkrasnobaeva@haproxy.com>
Mon, 25 Nov 2024 14:48:54 +0000 (15:48 +0100)
committerWilliam Lallemand <wlallemand@haproxy.com>
Mon, 16 Dec 2024 09:44:01 +0000 (10:44 +0100)
commit14f5e00d38fb1426223e28db276a31cf5ada14e3
treefa3445cd3e11f3a80432a35efc1d404042d200e3
parent1332e9b58d3fef8886bdd200803de9c6735fd887
REORG: startup: move code that applies limits to limits.c

In step_init_3() we try to apply provided or calculated earlier haproxy
maxsock and memmax limits.

Let's encapsulate these code blocks in dedicated functions:
apply_nofile_limit() and apply_memory_limit() and let's move them into
limits.c. Limits.c gathers now all the logic for calculating and setting
system limits in dependency of the provided configuration.
include/haproxy/limits.h
src/haproxy.c
src/limits.c