]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MINOR: init: add a "set-dumpable" global directive to enable core dumps
authorWilly Tarreau <w@1wt.eu>
Mon, 15 Apr 2019 17:38:50 +0000 (19:38 +0200)
committerWilly Tarreau <w@1wt.eu>
Tue, 16 Apr 2019 12:31:23 +0000 (14:31 +0200)
commit636848aa86fc9f75610be769de2ae414944784de
tree9b20a84e8692573483ba2e728a17e0abeb0c0239
parent482f9a9a2fd735c09ad2df1924125797190a3f75
MINOR: init: add a "set-dumpable" global directive to enable core dumps

It's always a pain to get a core dump when enabling user/group setting
(which disables the dumpable flag on Linux), when using a chroot and/or
when haproxy is started by a service management tool which requires
complex operations to just raise the core dump limit.

This patch introduces a new "set-dumpable" global directive to work
around these troubles by doing the following :

  - remove file size limits     (equivalent of ulimit -f unlimited)
  - remove core size limits     (equivalent of ulimit -c unlimited)
  - mark the process dumpable again (equivalent of suid_dumpable=1)

Some of these will depend on the operating system. This way it becomes
much easier to retrieve a core file. Temporarily moving the chroot to
a user-writable place generally enough.
Makefile
doc/configuration.txt
include/types/global.h
src/cfgparse-global.c
src/haproxy.c