Skip to content

Commit

Permalink
Fix Passenger temp dir calculation problems that could result in it r…
Browse files Browse the repository at this point in the history
…eferring to an Apache PID that does not exist.
  • Loading branch information
FooBarWidget committed Jun 11, 2010
1 parent 73f59cd commit 6d87d47
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ext/apache2/Hooks.cpp
Expand Up @@ -1257,6 +1257,13 @@ class Hooks {

~Hooks() {
removeDirTree(getPassengerTempDir().c_str());
/* mod_passenger is loaded twice during Apache startup (load, unload, load),
* but on OS X sometimes the old memory values of global variables can
* stay behind and affect the next load. So here we empty the temp dir variable
* explicitly so that the next load correctly calculates a new temp dir
* filename using the after-daemonization Apache PID.
*/
setPassengerTempDir("");
}

int prepareRequestWhenInHighPerformanceMode(request_rec *r) {
Expand Down

0 comments on commit 6d87d47

Please sign in to comment.