How to call a function when Apache terminates a Flask process? How to call a function when Apache terminates a Flask process? flask flask