command line to enable core dumps. This is for example the case with
generated configurations and regression testing. In this case, it is possible
to preset the set-dumpable argument in the HAPROXY_FORCE_DUMPABLE environment
- variable, which accepts the same values.
+ variable, which accepts the same values. The forced debug mode on the command
+ line ("-d") also turns set-dumpable on.
set-var <var-name> <expr>
Sets the process-wide variable '<var-name>' to the result of the evaluation
condition is false or 2 if an error is encountered.
-d : enable debug mode. This disables daemon mode, forces the process to stay
- in foreground and to show incoming and outgoing events. It must never be
- used in an init script.
+ in foreground and to show incoming and outgoing events. It also forcefully
+ enables "set-dumpable" in order to produce core dumps on crashes. This is
+ essentially meant to be used by developers. It must never be used in an
+ init script.
-dA[file] : dump an archive of all dependencies detected at boot time in the
designated file in tar format, immediately after the configuration is done
and chroot changes. When editing the configuration is not an option, such as
when dealing with generated configurations or regression tests, it is possible
to set the HAPROXY_FORCE_DUMPABLE environment variable to one of the values
-accepted by "set-dumpable". Please consult the configuration manual for more
-information on this topic.
+accepted by "set-dumpable". For developers who rely a lot on "-d", it also
+automatically enables "set-dumpable". Please consult the configuration manual
+for more information on this topic.
13. Security considerations
}
haproxy_init_args(argc, argv);
+
+ /* always enable dumpable mode in debug mode (-d) */
+ if (arg_mode & MODE_DEBUG)
+ global.tune.options |= GTUNE_SET_DUMPABLE;
}
/* call the various keyword dump functions based on the comma-delimited list of