mirror of
https://github.com/haproxy/haproxy.git
synced 2026-02-21 17:00:24 -05:00
* now we initialize the libc's localtime structures very early so
that even under OOM conditions, we can still send dated error messages without segfaulting.
This commit is contained in:
parent
e3283d1cd3
commit
a9e75f6eff
1 changed files with 6 additions and 0 deletions
|
|
@ -7628,6 +7628,12 @@ void init(int argc, char **argv) {
|
|||
exit(1);
|
||||
}
|
||||
|
||||
/* initialize the libc's localtime structures once for all so that we
|
||||
* won't be missing memory if we want to send alerts under OOM conditions.
|
||||
*/
|
||||
tv_now(&now);
|
||||
localtime(&now.tv_sec);
|
||||
|
||||
/* initialize the log header encoding map : '{|}"#' should be encoded with
|
||||
* '#' as prefix, as well as non-printable characters ( <32 or >= 127 ).
|
||||
* URL encoding only requires '"', '#' to be encoded as well as non-
|
||||
|
|
|
|||
Loading…
Reference in a new issue