]> git.ipfire.org Git - thirdparty/apache/httpd.git/commit
ab: Fix crash with -W when exiting earlya on fatal error.
authorYann Ylavic <ylavic@apache.org>
Tue, 20 Jun 2023 15:08:44 +0000 (15:08 +0000)
committerYann Ylavic <ylavic@apache.org>
Tue, 20 Jun 2023 15:08:44 +0000 (15:08 +0000)
commit2eb505fdb7e636deaabd40a35cebabbe91366681
tree5b0b4bd8b8b9e16d25645734cdc774fe908f262e
parent3ed9d65b05184f8859d9d37654c54a0d00ef0a96
ab: Fix crash with -W when exiting earlya on fatal error.

When multiple threads are failing (e.g. read/write timeout) it's not
thread-safe to simply/concurrently print the stats and exit. This can
result in garbage being printed or a crash.

Let's cleanly shutdown the threads and do the printing at a single point.
For the places where we want to fail but threads are not started yet we
can simply exit still, so to simplify the stats are not printed in an
atexit() handler.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1910513 13f79535-47bb-0310-9956-ffa450edef68
support/ab.c