mirror of
http://git.haproxy.org/git/haproxy.git
synced 2026-02-09 23:22:58 +02:00
Process runtime information could be very useful in post_mortem, but we have to collect it just before calling run_poll_loop(). Like this we are sure, that we've successfully applied all configuration parameters and what we've collected are the latest runtime settings. The most appropraite place to collect such information is feed_post_mortem_late(). It's called in each thread, but puts thread info in the post_mortem only when it's in the last thread context. As it's called under mutex lock, other threads at this moment have to wait until feed_post_mortem_late() and another initialization functions from per_thread_init_list will finish. The number of threads could be large. So, to avoid spending a lot of time under the lock, let's exit immediately from feed_post_mortem_late(), if it wasn't called in the last thread.