With commit
62c0c84b81 ("MINOR: init: automatically turn
"set-dumpable" on when using "-d""), an interesting issue arrived:
if started as an unprivileged user with ulimit -c forced to zero,
then an error is reported saying it's not possible to raise the
limit, and the process fails to start. This is ridiculous but logical
and can easily be dealt with because this only happens when the
strict-limits are set. Let's have -d also turn the strict limits off.
No backport is needed.
haproxy_init_args(argc, argv);
- /* always enable dumpable mode in debug mode (-d) */
- if (arg_mode & MODE_DEBUG)
+ /* always enable dumpable mode in debug mode (-d), but do not fail on
+ * limits.
+ */
+ if (arg_mode & MODE_DEBUG) {
global.tune.options |= GTUNE_SET_DUMPABLE;
+ global.tune.options &= ~GTUNE_STRICT_LIMITS;
+ }
}
/* call the various keyword dump functions based on the comma-delimited list of