Page MenuHomePhabricator

Make sure TempFiles are destroyed after a PHP fatal error
ClosedPublic

Authored by epriestley on Aug 21 2014, 6:39 PM.
Tags
None
Referenced Files
F13098682: D10329.diff
Fri, Apr 26, 9:23 AM
Unknown Object (File)
Thu, Apr 25, 1:04 AM
Unknown Object (File)
Fri, Apr 19, 5:40 PM
Unknown Object (File)
Thu, Apr 11, 8:45 AM
Unknown Object (File)
Wed, Apr 10, 1:34 AM
Unknown Object (File)
Thu, Apr 4, 11:50 PM
Unknown Object (File)
Mar 25 2024, 12:03 PM
Unknown Object (File)
Mar 21 2024, 1:56 AM
Subscribers

Details

Summary

Fixes T4284. Object destructors are not called after a fatal, but shutdown functions are.

Test Plan
  • Created a test script which makes a temp file, then fatals.
  • Before patch, temp file was left around.
  • After patch, it is cleaned up.
  • Explicitly destroyed the tempfile in the script to verify that double-destruction is fine.
  • Removed fatal to verify that normal behavior works as expected.

Diff Detail

Repository
rPHU libphutil
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

epriestley retitled this revision from to Make sure TempFiles are destroyed after a PHP fatal error.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: btrahan.
  • Also null out the path, just in case someone tries to do something silly with a destroyed file.
btrahan edited edge metadata.
This revision is now accepted and ready to land.Aug 21 2014, 6:49 PM
epriestley updated this revision to Diff 24869.

Closed by commit rPHU8695cdb1270b (authored by @epriestley).